public void testChildContextIsolation() throws Exception {
CompositeContext parent = createContextHierachy();
CompositeContext child = (CompositeContext) parent.getContext("test.child");
Component component = factory.createSystemComponent("TestService1", ModuleScopeSystemComponent.class, ModuleScopeSystemComponentImpl.class, Scope.MODULE);
component.initialize(new AssemblyContextImpl(factory, null, null));
child.registerModelObject(component);
parent.publish(new ModuleStart(this));
child.publish(new ModuleStart(this));
Assert.assertNotNull(child.getContext("TestService1").getInstance(null));
try {