AtomicComponent sourceComponent = contexts.get("source");
AtomicComponent targetComponent = contexts.get("target");
scopeCtx.register(sourceComponent);
scopeCtx.register(targetComponent);
scopeCtx.onEvent(new CompositeStart(this, null));
OrderedDependentPojo source = (OrderedDependentPojo) scopeCtx.getInstance(sourceComponent);
OrderedInitPojo target = (OrderedInitPojo) scopeCtx.getInstance(targetComponent);
assertNotNull(source.getPojo());
assertNotNull(target);
assertEquals(2, source.getNumberInstantiated());
scopeCtx.onEvent(new CompositeStop(this, null));
assertEquals(0, source.getNumberInstantiated());
scopeCtx.stop();
}