GroovyAtomicComponent component = new GroovyAtomicComponent(configuration, null);
ObjectFactory<?> factory = createMock(ObjectFactory.class);
expect((String) factory.getInstance()).andReturn("bar");
replay(factory);
component.addPropertyFactory("property", factory);
Greeting greeting = (Greeting) component.getServiceInstance();
assertEquals("bar", greeting.greet("foo"));
}