CompositeContext context = (CompositeContext) runtime.getSystemContext().getContext("test.system");
context.publish(new ModuleStart(this));
//context.registerModelObject(module);
Source source = (Source) ((AtomicContext)context.getContext("source")).getTargetInstance();
Assert.assertNotNull(source);
Target targetRef = source.getTarget();
Assert.assertNotNull(targetRef);
Target target = (Target) ((AtomicContext)context.getContext("target")).getTargetInstance();
Assert.assertSame(target, targetRef);
Source source2 = (Source) ((AtomicContext)context.getContext("source")).getTargetInstance();
Assert.assertSame(target, source2.getTarget());
context.publish(new ModuleStop(this));
context.stop();