@InvokeOnHeader(Web3jConstants.ETH_SEND_TRANSACTION)
    void ethSendTransaction(Message message) throws IOException {
        String fromAddress = message.getHeader(Web3jConstants.FROM_ADDRESS, configuration::getFromAddress, String.class);
        String toAddress = message.getHeader(Web3jConstants.TO_ADDRESS, configuration::getToAddress, String.class);
        BigInteger nonce = message.getHeader(Web3jConstants.NONCE, configuration::getNonce, BigInteger.class);
        BigInteger gasPrice = message.getHeader(Web3jConstants.GAS_PRICE, configuration::getGasPrice, BigInteger.class);
        BigInteger gasLimit = message.getHeader(Web3jConstants.GAS_LIMIT, configuration::getGasLimit, BigInteger.class);
        BigInteger value = message.getHeader(Web3jConstants.VALUE, configuration::getValue, BigInteger.class);
        String data = message.getHeader(Web3jConstants.DATA, configuration::getData, String.class);

        org.web3j.protocol.core.methods.request.Transaction transaction
                = new org.web3j.protocol.core.methods.request.Transaction(
                        fromAddress, nonce, gasPrice, gasLimit, toAddress, value, data);

        Request<?, EthSendTransaction> request = web3j.ethSendTransaction(transaction);
        setRequestId(message, request);
        EthSendTransaction response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getTransactionHash());
        }
    }
@Test
    public void ethSendTransactionTest() throws Exception {
        EthSendTransaction response = Mockito.mock(EthSendTransaction.class);
        Mockito.when(mockWeb3j.ethSendTransaction(any())).thenReturn(request);
        Mockito.when(request.send()).thenReturn(response);
        Mockito.when(response.getTransactionHash()).thenReturn("test");

        Exchange exchange = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.ETH_SEND_TRANSACTION);
        template.send(exchange);
        String body = exchange.getIn().getBody(String.class);
        assertEquals("test", body);
    }