ServiceContext sc = Utils.getServiceContext(import3);
ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
assertNotNull("Test foo availability inside the composite - 1", refs);
assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
FooService fs = (FooService) sc.getService(refs[0]);
assertTrue("Test foo invocation", fs.foo());
sc.ungetService(refs[0]);
foo2.stop();
assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
sc = Utils.getServiceContext(import3);