### Question:
TransactionRepositoryOkHttpImpl extends AbstractRepositoryOkHttpImpl implements TransactionRepository { @Override public Observable<Transaction> getTransaction(TransactionGroup group, String transactionHash) { Callable<TransactionInfoDTO> callback = () -> getBasicTransactions(group, transactionHash); return exceptionHandling( call(callback).map(transactionInfoDTO -> mapTransaction(group, transactionInfoDTO))); } TransactionRepositoryOkHttpImpl(ApiClient apiClient); TransactionRoutesApi getClient(); @Override Observable<Transaction> getTransaction(TransactionGroup group, String transactionHash); @Override Observable<List<Transaction>> getTransactions(
      TransactionGroup group, List<String> transactionHashes); @Override Observable<TransactionAnnounceResponse> announce(SignedTransaction signedTransaction); @Override Observable<TransactionAnnounceResponse> announceAggregateBonded(
      SignedTransaction signedTransaction); @Override Observable<TransactionAnnounceResponse> announceAggregateBondedCosignature(
      CosignatureSignedTransaction cosignatureSignedTransaction); @Override Observable<Page<Transaction>> search(TransactionSearchCriteria criteria);  }### Answer:
@Test public void shouldGetTransaction() throws Exception { TransactionInfoDTO transactionInfoDTO = loadTransactionInfoDTO("aggregateMosaicCreationTransaction.json", TransactionInfoDTO.class); String hash = jsonHelper.getString(transactionInfoDTO, "meta", "hash"); mockRemoteCall(transactionInfoDTO); Transaction transaction = repository.getTransaction(TransactionGroup.CONFIRMED, hash).toFuture().get(); Assertions.assertNotNull(transaction); Assertions.assertEquals(hash, transaction.getTransactionInfo().get().getHash().get()); Assertions.assertEquals(TransactionGroup.CONFIRMED, transaction.getGroup().get()); }
@Test public void shouldGetTransactionPartial() throws Exception { TransactionInfoDTO transactionInfoDTO = loadTransactionInfoDTO("aggregateMosaicCreationTransaction.json", TransactionInfoDTO.class); String hash = jsonHelper.getString(transactionInfoDTO, "meta", "hash"); mockRemoteCall(transactionInfoDTO); Transaction transaction = repository.getTransaction(TransactionGroup.PARTIAL, hash).toFuture().get(); Assertions.assertNotNull(transaction); Assertions.assertEquals(hash, transaction.getTransactionInfo().get().getHash().get()); Assertions.assertEquals(TransactionGroup.PARTIAL, transaction.getGroup().get()); }
@Test public void shouldGetTransactionUnconfirmed() throws Exception { TransactionInfoDTO transactionInfoDTO = loadTransactionInfoDTO("aggregateMosaicCreationTransaction.json", TransactionInfoDTO.class); String hash = jsonHelper.getString(transactionInfoDTO, "meta", "hash"); mockRemoteCall(transactionInfoDTO); Transaction transaction = repository.getTransaction(TransactionGroup.UNCONFIRMED, hash).toFuture().get(); Assertions.assertNotNull(transaction); Assertions.assertEquals(hash, transaction.getTransactionInfo().get().getHash().get()); Assertions.assertEquals(TransactionGroup.UNCONFIRMED, transaction.getGroup().get()); }