public void testEagerInit() throws Exception {
EventContext ctx = new EventContextImpl();
ModuleScopeContext scope = new ModuleScopeContext(ctx);
scope.registerFactories(createEagerInitComponents());
scope.start();
scope.onEvent(new ModuleStart(this));
ModuleScopeEagerInitDestroyComponent initDestroy = (ModuleScopeEagerInitDestroyComponent) scope.getContext(
"TestServiceEagerInitDestroy").getInstance(null);
Assert.assertNotNull(initDestroy);
ModuleScopeEagerInitComponent initOnly = (ModuleScopeEagerInitComponent) scope
.getContext("TestServiceEagerInit").getInstance(null);