TransactionContext { public CryptoSuite getCryptoPrimitives() { return cryptoPrimitives; } TransactionContext(Channel channel, User user, CryptoSuite cryptoPrimitives); CryptoSuite getCryptoPrimitives(); Identities.SerializedIdentity getIdentity(); long getEpoch(); User getUser(); Channel getChannel(); long getProposalWaitTime(); void setProposalWaitTime(long proposalWaitTime); Timestamp getFabricTimestamp(); ByteString getNonce(); void verify(boolean verify); boolean getVerify(); String getChannelID(); String getTxID(); ByteString signByteString(byte[] b); ByteString signByteStrings(ByteString... bs); ByteString[] signByteStrings(User[] users, ByteString... bs); TransactionContext retryTransactionSameContext();  }
@Test public void testGetters() throws Exception { Channel channel = createTestChannel("channel1"); User user = hfclient.getUserContext(); CryptoSuite cryptoSuite = hfclient.getCryptoSuite(); TransactionContext context = new TransactionContext(channel, user, cryptoSuite); CryptoSuite cryptoPrimitives = context.getCryptoPrimitives(); Assert.assertEquals(cryptoSuite, cryptoPrimitives); }