use of com.hedera.services.sigs.metadata.DelegatingSigMetadataLookup in project hedera-services by hashgraph.
the class SigRequirementsTest method reportsGeneralErrorInCryptoTransfer.
@Test
void reportsGeneralErrorInCryptoTransfer() throws Throwable {
// given:
setupForNonStdLookup(CRYPTO_TRANSFER_NO_RECEIVER_SIG_SCENARIO, new DelegatingSigMetadataLookup(FileAdapter.throwingUoe(), AccountAdapter.withSafe(id -> SafeLookupResult.failure(KeyOrderingFailure.MISSING_FILE)), ContractAdapter.withSafe(id -> SafeLookupResult.failure(KeyOrderingFailure.INVALID_CONTRACT)), TopicAdapter.throwingUoe(), id -> null, id -> null));
mockSummaryFactory();
// and:
SigningOrderResult<ResponseCodeEnum> result = mock(SigningOrderResult.class);
given(mockSummaryFactory.forGeneralError()).willReturn(result);
// when:
subject.keysForOtherParties(txn, mockSummaryFactory);
// then:
verify(mockSummaryFactory).forGeneralError();
}
Aggregations