@Test
public void testLazyCreationSeveralM() {
assertEquals("Check that no objects are created ", 0, ((PrimitiveInstanceDescription) lazzyArchSevM.getInstanceDescription()).getCreatedObjects().length);
ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy_sevM.getInstanceName());
assertNotNull("Check that a FooService from " + ci_lazzy_sevM.getInstanceName() + " is available", ref);
FooService fs = (FooService) osgiHelper.getServiceObject(ref);
assertTrue("Check the FooService invocation", fs.foo());
assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArchSevM.getInstanceDescription()).getCreatedObjects().length);
FooService fs2 = (FooService) osgiHelper.getServiceObject(ref);
assertTrue("Check the FooService invocation-2", fs2.foo());
// Only one object as the getService method is called only once (service factory) despite the policy="method".
assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArchSevM.getInstanceDescription()).getCreatedObjects().length);
}