### Question:
TransactionApiImpl implements TransactionApi { @Override public TransactionDto getTransactionByBlockNumber(String branchId, long blockNumber, int txIndexPosition) { ConsensusBlock block = branchGroup.getBlockByIndex(BranchId.of(branchId), blockNumber); List<Transaction> txList = block.getBody().getTransactionList(); return TransactionDto.createBy(txList.get(txIndexPosition)); } @Autowired  TransactionApiImpl(BranchGroup branchGroup); @Override int getTransactionCountByBlockHash(String branchId, String blockId); @Override int getTransactionCountByBlockNumber(String branchId, long blockNumber); @Override TransactionDto getTransactionByHash(String branchId, String txId); @Override TransactionDto getTransactionByBlockHash(String branchId, String blockId,
                                                     int txIndexPosition); @Override TransactionDto getTransactionByBlockNumber(String branchId, long blockNumber,
                                                       int txIndexPosition); @Override TransactionDto getTransactionByBlockNumber(String branchId, String tag,
                                                       int txIndexPosition); @Override TransactionResponseDto sendTransaction(TransactionDto tx); @Override TransactionResponseDto sendRawTransaction(byte[] bytes); @Override int newPendingTransactionFilter(String branchId); @Override List<String> getPendingTransactionList(String branchId); @Override int getPendingTransactionCount(String branchId); @Override TransactionReceiptDto getTransactionReceipt(String branchId, String txId); @Override String getRawTransaction(String branchId, String txId); @Override String getRawTransactionHeader(String branchId, String txId);  }### Answer:
@Test public void getTransactionByBlockNumberTest() { assertThat(txApi.getTransactionByBlockNumber(yggdrashBranch, 0, 0)) .isNotNull(); }
@Test public void getTransactionByBlockNumberWithTagTest() { try { String tag = "latest"; Assert.assertNotNull(txApi.getTransactionByBlockNumber(yggdrashBranch, tag, 0)); } catch (Exception e) { log.debug("\n\ngetTransactionByBlockNumberWithTagTest :: exception => " + e); } }