@InvokeOnHeader(Web3jConstants.ETH_GET_TRANSACTION_COUNT)
    void ethGetTransactionCount(Message message) throws IOException {
        String address = message.getHeader(Web3jConstants.ADDRESS, configuration::getAddress, String.class);
        DefaultBlockParameter atBlock
                = toDefaultBlockParameter(message.getHeader(Web3jConstants.AT_BLOCK, configuration::getAtBlock, String.class));
        Request<?, EthGetTransactionCount> request = web3j.ethGetTransactionCount(address, atBlock);
        setRequestId(message, request);
        EthGetTransactionCount response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getTransactionCount());
        }
    }
@Test
    public void ethGetTransactionCountTest() throws Exception {
        EthGetTransactionCount response = Mockito.mock(EthGetTransactionCount.class);
        Mockito.when(mockWeb3j.ethGetTransactionCount(any(), any())).thenReturn(request);
        Mockito.when(request.send()).thenReturn(response);
        Mockito.when(response.getTransactionCount()).thenReturn(BigInteger.ONE);

        Exchange exchange = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.ETH_GET_TRANSACTION_COUNT);
        template.send(exchange);
        BigInteger body = exchange.getIn().getBody(BigInteger.class);
        assertEquals(BigInteger.ONE, body);
    }