@InvokeOnHeader(Web3jConstants.ETH_GET_BLOCK_BY_HASH)
    void ethGetBlockByHash(Message message) throws IOException {
        Boolean fullTransactionObjects = message.getHeader(Web3jConstants.FULL_TRANSACTION_OBJECTS,
                configuration::isFullTransactionObjects, Boolean.class);
        String blockHash = message.getHeader(Web3jConstants.BLOCK_HASH, configuration::getBlockHash, String.class);
        Request<?, EthBlock> request = web3j.ethGetBlockByHash(blockHash, fullTransactionObjects);
        setRequestId(message, request);
        EthBlock response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getBlock());
        }
    }
@Test
    public void ethGetBlockByHashTest() throws Exception {
        EthBlock response = Mockito.mock(EthBlock.class);
        Mockito.when(mockWeb3j.ethGetBlockByHash(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_HASH);
        template.send(exchange);
        EthBlock.Block body = exchange.getIn().getBody(EthBlock.Block.class);
        assertNotNull(body);
    }