@InvokeOnHeader(Web3jConstants.ETH_GET_LOGS)
    void ethGetLogs(Message message) throws IOException {
        DefaultBlockParameter fromBlock = toDefaultBlockParameter(
                message.getHeader(Web3jConstants.FROM_BLOCK, configuration::getFromBlock, String.class));
        DefaultBlockParameter toBlock
                = toDefaultBlockParameter(message.getHeader(Web3jConstants.TO_BLOCK, configuration::getToBlock, String.class));
        List<String> addresses = message.getHeader(Web3jConstants.ADDRESSES, configuration::getAddresses, List.class);
        List<String> topics = message.getHeader(Web3jConstants.TOPICS, configuration::getTopics, List.class);
        org.web3j.protocol.core.methods.request.EthFilter ethFilter
                = Web3jEndpoint.buildEthFilter(fromBlock, toBlock, addresses, topics);

        Request<?, EthLog> request = web3j.ethGetLogs(ethFilter);
        setRequestId(message, request);
        EthLog response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getLogs());
        }
    }
@Test
    public void ethGetLogsTest() throws Exception {
        EthLog response = Mockito.mock(EthLog.class);
        Mockito.when(mockWeb3j.ethGetLogs(any())).thenReturn(request);
        Mockito.when(request.send()).thenReturn(response);
        Mockito.when(response.getLogs()).thenReturn(Collections.EMPTY_LIST);

        Exchange exchange = createExchangeWithBodyAndHeader(null, OPERATION, Web3jConstants.ETH_GET_LOGS);
        template.send(exchange);
        List body = exchange.getIn().getBody(List.class);
        assertTrue(body.isEmpty());
    }