### Question:
TransactionApiImpl implements TransactionApi { @Override public TransactionResponseDto sendRawTransaction(byte[] bytes) { Transaction transaction = TransactionImpl.parseFromRaw(bytes); return addTx(transaction); } @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 @Ignore public void sendRawTransactionTest() { try { byte[] input = createTx().toRawTransaction(); TransactionResponseDto res = TX_API.sendRawTransaction(input); assertTrue(res.status); } catch (Exception e) { log.debug("\n\ninvalidTransactionTest :: ERR => {}", e.getMessage()); e.printStackTrace(); } }
@Test public void sendInvalidDataFormatOfRawTx() { byte[] input = "Invalid Raw Transaction Input Data".getBytes(); TransactionResponseDto transactionResponseDto = txApi.sendRawTransaction(input); assertTrue(!transactionResponseDto.logs.isEmpty()); }