use of com.hedera.mirror.importer.parser.record.RecordParserProperties in project hedera-mirror-node by hashgraph.
the class TransactionSignatureTest method setup.
@BeforeEach
void setup() {
CommonParserProperties commonParserProperties = new CommonParserProperties();
EntityProperties entityProperties = new EntityProperties();
RecordParserProperties parserProperties = new RecordParserProperties();
entityRecordItemListener = new EntityRecordItemListener(commonParserProperties, entityProperties, addressBookService, nonFeeTransferExtractionStrategy, entityIdService, entityListener, transactionHandlerFactory, fileDataRepository, parserProperties, contractResultService);
defaultSignatureMap = getDefaultSignatureMap();
defaultTransactionSignatures = defaultSignatureMap.getSigPairList().stream().map(pair -> {
TransactionSignature transactionSignature = new TransactionSignature();
transactionSignature.setConsensusTimestamp(CONSENSUS_TIMESTAMP);
transactionSignature.setEntityId(ENTITY_ID);
transactionSignature.setPublicKeyPrefix(pair.getPubKeyPrefix().toByteArray());
transactionSignature.setSignature(pair.getEd25519().toByteArray());
transactionSignature.setType(SignaturePair.SignatureCase.ED25519.getNumber());
return transactionSignature;
}).collect(Collectors.toList());
transactionSignatures = entityProperties.getPersist().getTransactionSignatures();
doReturn(ENTITY_ID).when(transactionHandler).getEntity(any(RecordItem.class));
doReturn(transactionHandler).when(transactionHandlerFactory).get(any(TransactionType.class));
}
Aggregations