@InvokeOnHeader(Web3jConstants.ETH_GET_BLOCK_BY_NUMBER)
    void ethGetBlockByNumber(Message message) throws IOException {
        DefaultBlockParameter atBlock
                = toDefaultBlockParameter(message.getHeader(Web3jConstants.AT_BLOCK, configuration::getAtBlock, String.class));
        Boolean fullTransactionObjects = message.getHeader(Web3jConstants.FULL_TRANSACTION_OBJECTS,
                configuration::isFullTransactionObjects, Boolean.class);
        Request<?, EthBlock> request = web3j.ethGetBlockByNumber(atBlock, fullTransactionObjects);
        setRequestId(message, request);
        EthBlock response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getBlock());
        }
    }
@Test
    public void ethGetBlockByNumberTest() throws Exception {
        EthBlock response = Mockito.mock(EthBlock.class);
        Mockito.when(mockWeb3j.ethGetBlockByNumber(any(), anyBoolean())).thenReturn(request);
        Mockito.when(request.send()).thenReturn(response);
        Mockito.when(response.getBlock()).thenReturn(Mockito.mock(EthBlock.Block.class));

        Exchange exchange = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.ETH_GET_BLOCK_BY_NUMBER);
        exchange.getIn().setHeader(Web3jConstants.AT_BLOCK, DefaultBlockParameterName.EARLIEST);
        exchange.getIn().setHeader(Web3jConstants.FULL_TRANSACTION_OBJECTS, true);

        template.send(exchange);
        EthBlock.Block body = exchange.getIn().getBody(EthBlock.Block.class);
        assertNotNull(body);
    }