@InvokeOnHeader(Web3jConstants.ETH_GET_CODE)
    void ethGetCode(Message message) throws IOException {
        DefaultBlockParameter atBlock
                = toDefaultBlockParameter(message.getHeader(Web3jConstants.AT_BLOCK, configuration::getAtBlock, String.class));
        String address = message.getHeader(Web3jConstants.ADDRESS, configuration::getAddress, String.class);
        Request<?, EthGetCode> request = web3j.ethGetCode(address, atBlock);
        setRequestId(message, request);
        EthGetCode response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getCode());
        }
    }
@Test
    public void ethGetCodeTest() throws Exception {
        EthGetCode response = Mockito.mock(EthGetCode.class);
        Mockito.when(mockWeb3j.ethGetCode(any(), any())).thenReturn(request);
        Mockito.when(request.send()).thenReturn(response);
        Mockito.when(response.getCode()).thenReturn("test");

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