use of com.hedera.services.state.submerkle.ExpirableTxnRecord in project hedera-services by hashgraph.
the class BasicTransactionContextTest method hasExpectedCopyFields.
@Test
void hasExpectedCopyFields() {
given(exchange.fcActiveRates()).willReturn(ExchangeRates.fromGrpc(ratesNow));
given(accessor.getTxnId()).willReturn(txnId);
given(accessor.getTxn()).willReturn(txn);
given(txn.getMemo()).willReturn(memo);
given(accessor.getHash()).willReturn(hash);
setUpBuildingExpirableTxnRecord();
// when:
ExpirableTxnRecord record = subject.recordSoFar().build();
// expect:
assertEquals(memo, record.getMemo());
assertArrayEquals(hash, record.asGrpc().getTransactionHash().toByteArray());
assertEquals(txnId, record.asGrpc().getTransactionID());
assertEquals(RichInstant.fromJava(now), record.getConsensusTimestamp());
}
Aggregations