//ProcessedBean is a test to ensure that BeanProcessors are called..
//The test has the BeanProcessor look for ProcessableBeans, and log itself with them
Object obj4 = beanContainer.getComponentInstance("ProcessedBean");
assertTrue(obj4 instanceof ProcessableBean);
ProcessableBean pb = (ProcessableBean)obj4;
//Note, the BeanProcessor exists in the same container as the beans it processes!!
Object bp = beanContainer.getComponentInstance("http://ns.handler.three/BeanProcessor");
assertNotNull(bp);
assertTrue(bp instanceof BeanProcessor);
assertEquals(1,pb.getProcessedBy().size());
//check we were invoked..
assertEquals(pb.getProcessedBy().get(0),bp);
//check invocation for each phase.
assertEquals(pb.getProcessedBy(Phase.BEFORE_INIT).get(0),bp);
assertEquals(pb.getProcessedBy(Phase.AFTER_INIT).get(0),bp);
//destroy invocation will only occur at tear down.. TODO, how to test after teardown.
//assertEquals(pb.getProcessedBy(Phase.BEFORE_DESTROY).get(0),bp);
//assertEquals(pb.getProcessedBy(Phase.AFTER_DESTROY).get(0),bp);
}