assertTrue(factory.toString().indexOf("TestServiceLocator3") != -1);
}
public void testServiceMappings() {
StaticApplicationContext ctx = new StaticApplicationContext();
ctx.registerPrototype("testService1", TestService.class, new MutablePropertyValues());
ctx.registerPrototype("testService2", ExtendedTestService.class, new MutablePropertyValues());
MutablePropertyValues mpv = new MutablePropertyValues();
mpv.addPropertyValue("serviceLocatorInterface", TestServiceLocator3.class);
mpv.addPropertyValue("serviceMappings", "=testService1\n1=testService1\n2=testService2");
ctx.registerSingleton("factory", ServiceLocatorFactoryBean.class, mpv);