public void testSuccess()
{
String result = "Obtained via BeanFactory.";
MockControl factoryControl = newControl(BeanFactory.class);
BeanFactory factory = (BeanFactory) factoryControl.getMock();
MockControl moduleControl = newControl(Module.class);
Module module = (Module) moduleControl.getMock();
module.getService("factory", BeanFactory.class);
moduleControl.setReturnValue(factory);
factory.get("my-bean,initialized");
factoryControl.setReturnValue(result);
replayControls();
ObjectProvider op = new BeanFactoryObjectProvider();