@Test public void testParentChildAnnotationConfigurationFromAnotherPackage() { AnnotationConfigApplicationContext child = new AnnotationConfigApplicationContext(); child.register(org.springframework.integration.configuration2.ChildConfiguration.class); child.setParent(this.context); child.refresh(); AbstractMessageChannel foo = child.getBean("foo", AbstractMessageChannel.class); ChannelInterceptor baz = child.getBean("baz", ChannelInterceptor.class); assertTrue(foo.getChannelInterceptors().contains(baz)); assertFalse(this.output.getChannelInterceptors().contains(baz)); child.close(); }