@Test public void testPreReceive() throws Exception { MessageSourcePollerInterceptor interceptor = new MessageSourcePollerInterceptor(new TestMessageSource("foo")); QueueChannel channel = new QueueChannel(); assertTrue(interceptor.preReceive(channel)); assertEquals("foo", channel.receive(10L).getPayload()); }