helper.dispose();
}
public void testTypedList() {
ServiceReference ref = helper.getServiceReferenceByName(CheckService.class.getName(), checker.getInstanceName());
CheckService check = (CheckService) getServiceObject(ref);
assertNotNull("Checker availability", check);
// Check without providers
assertFalse("Empty list", check.check());
// Start the first provider
foo1.start();
assertTrue("List with one element", check.check());
Properties props = check.getProps();
List<FooService> list = (List<FooService>) props.get("list");
assertEquals("Check size - 1", 1, list.size());
// Start the second provider
foo2.start();
assertTrue("List with two element", check.check());
props = check.getProps();
list = (List<FooService>) props.get("list");
assertEquals("Check size - 2", 2, list.size());
// Stop the first one
foo1.stop();
assertTrue("List with one element (2)", check.check());
props = check.getProps();
list = (List<FooService>) props.get("list");
assertEquals("Check size - 3", 1, list.size());
}