@InvokeOnHeader(Web3jConstants.ETH_NEW_FILTER)
    void ethNewFilter(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<?, EthFilter> request = web3j.ethNewFilter(ethFilter);
        setRequestId(message, request);
        EthFilter response = request.send();
        boolean hasError = checkForError(message, response);
        if (!hasError) {
            message.setBody(response.getFilterId());
        }
    }
@Test
    public void ethNewFilterTest() throws Exception {
        EthFilter response = Mockito.mock(EthFilter.class);
        Mockito.when(mockWeb3j.ethNewFilter(any())).thenReturn(request);
        Mockito.when(request.send()).thenReturn(response);
        Mockito.when(response.getFilterId()).thenReturn(BigInteger.ONE);

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