TransactionTemplate extends AbstractTemplate implements TransactionOperation { @Override public Transaction getTransaction(final TxHash txHash) { return request(convertedTransactionMethod, Arrays.<Object>asList(txHash)); } TransactionTemplate(final ContextStorage<Context> contextStorage); @Override Transaction getTransaction(final TxHash txHash); @Override TxReceipt getTxReceipt(TxHash txHash); @Override TxHash commit(final Transaction transaction); @Override TxHash sendTx(final Signer signer, final AccountAddress recipient, final Aer amount,
      final long nonce, final Fee fee, final BytesValue payload); @Override TxHash sendTx(final Signer signer, final Name recipient, final Aer amount,
      final long nonce, final Fee fee, final BytesValue payload);  }
@Test public void testGetTransaction() throws Exception { final TransactionTemplate transactionTemplate = new TransactionTemplate(contextStorage); final Requester mockRequester = mock(Requester.class); final Transaction expected = anyTransaction; when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any())) .thenReturn(expected); transactionTemplate.requester = mockRequester; final Transaction actual = transactionTemplate.getTransaction(anyTxHash); assertEquals(expected, actual); }