context.start();
context.registerModelObject(MockFactory.createModuleWithWiredComponents(Scope.MODULE, Scope.MODULE));
context.publish(new ModuleStart(this));
Source source = (Source) ((AtomicContext) context.getContext("source")).getTargetInstance();
Assert.assertNotNull(source);
Target target = (Target) ((AtomicContext)context.getContext("target")).getTargetInstance();
Assert.assertNotNull(target);
// test setter injection
List<Target> targets = source.getTargets();
Assert.assertEquals(1, targets.size());