ServiceReference sr_arch = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), "HandlerTest-1");
Architecture arch = (Architecture) getContext().getService(sr_arch);
assertEquals("Check validity", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
// Kill the handler factory
HandlerManagerFactory f = (HandlerManagerFactory) Utils.getHandlerFactoryByName(getContext(), "check");
f.stop();
sr = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "HandlerTest-1");
assertNull("Check the check service unavailability", sr);
sr_arch = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), "HandlerTest-1");
assertNull("Check the architecture unavailability", sr_arch);
// The instance is disposed, restart the handler
f.start();
Properties props = new Properties();
props.put("instance.name","HandlerTest-1");
props.put("csh.simple", "simple");
Properties p = new Properties();