@InvokeOnHeader(Web3jConstants.ETH_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX)
    void ethGetTransactionByBlockHashAndIndex(Message message) throws IOException {
        String blockHash = message.getHeader(Web3jConstants.BLOCK_HASH, configuration::getBlockHash, String.class);
        BigInteger transactionIndex = message.getHeader(Web3jConstants.INDEX, configuration::getIndex, BigInteger.class);
        Request<?, EthTransaction> request = web3j.ethGetTransactionByBlockHashAndIndex(blockHash, transactionIndex);
        setRequestId(message, request);
        EthTransaction response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getTransaction().isPresent() ? response.getTransaction().get() : null);
        }
    }
@Test
    public void ethGetTransactionByBlockHashAndIndexTest() throws Exception {
        EthTransaction response = Mockito.mock(EthTransaction.class);
        Mockito.when(mockWeb3j.ethGetTransactionByBlockHashAndIndex(any(), any())).thenReturn(request);
        Mockito.when(request.send()).thenReturn(response);
        Transaction transaction = Mockito.mock(Transaction.class);
        Optional<Transaction> optional = Optional.ofNullable(transaction);
        Mockito.when(response.getTransaction()).thenReturn(optional);

        Exchange exchange
                = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.ETH_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX);
        template.send(exchange);
        Transaction body = exchange.getIn().getBody(Transaction.class);
        assertNotNull(body);
    }