### Question:
RabbitmqInterimProcessor implements InterimProcessor { @Override public void process(Exchange exchange) throws Exception { exchange.getIn().getHeaders().keySet().stream().collect(toList()).stream() .filter(header -> header.startsWith("rabbitmq")) .forEach(header -> exchange.getIn().removeHeader(header)); }  @Override void process(Exchange exchange);  }### Answer:
@Test public void testFilterRabbitMqHeaders() throws Exception { Exchange exchange = mock(Exchange.class); Message in = mock(Message.class); when(exchange.getIn()).thenReturn(in); when(in.getHeaders()).thenReturn(map( "rabbitmq.HEADER1", "value1", "rabbitmq.HEADER2", "value2", "another.HEADER", "value3" )); new RabbitmqInterimProcessor().process(exchange); verify(in).removeHeader("rabbitmq.HEADER1"); verify(in).removeHeader("rabbitmq.HEADER2"); }