use of com.hedera.services.exceptions.InvalidTransactionException in project hedera-services by hashgraph.
the class TokenGrantKycTransitionLogicTest method capturesInvalidGrantKyc.
@Test
void capturesInvalidGrantKyc() {
givenValidTxnCtx();
// and:
doThrow(new InvalidTransactionException(TOKEN_HAS_NO_KYC_KEY)).when(tokenRelationship).changeKycState(true);
// then:
assertFailsWith(() -> subject.doStateTransition(), TOKEN_HAS_NO_KYC_KEY);
verify(tokenStore, never()).commitTokenRelationships(List.of(tokenRelationship));
}
Aggregations