assertTrue(foo.initialized);
}
public void testReferenceAndPropertyConstructor() throws Exception {
PojoObjectFactory<Bar> factory = new PojoObjectFactory<Bar>(Bar.class.getConstructor(String.class, Foo.class));
PojoConfiguration configuration = new PojoConfiguration();
configuration.addServiceInterface(Foo.class);
configuration.setInstanceFactory(factory);
configuration.setInitInvoker(initInvoker);
configuration.addConstructorParamName("foo");
configuration.addConstructorParamName("ref");
SystemAtomicComponentImpl component = new SystemAtomicComponentImpl("foo", configuration);
component.addPropertyFactory("foo", new SingletonObjectFactory<String>("baz"));
Foo target = new Foo();
SystemOutboundWire wire = EasyMock.createMock(SystemOutboundWire.class);
EasyMock.expect(wire.getTargetService()).andReturn(target);