@Test
public void testGetTransaction() {

  // given
  final TransactionOperation mockOperation = mock(TransactionOperation.class);
  when(mockOperation.getTransaction(any(TxHash.class)))
      .thenReturn(anyTransaction);
  final AergoClient mockClient = mock(AergoClient.class);
  when(mockClient.getTransactionOperation()).thenReturn(mockOperation);
  final ClientProvider mockClientProvider = mock(ClientProvider.class);
  when(mockClientProvider.getClient()).thenReturn(mockClient);
  // then
  final QueryApi queryApi = new QueryApiImpl(mockClientProvider);
  final Transaction transaction = queryApi.getTransaction(anyTxHash);
  assertNotNull(transaction);
}