scope.start();
scope.onEvent(new ModuleStart(this));
ModuleScopeInitDestroyComponent initDestroy = (ModuleScopeInitDestroyComponent) scope.getContext(
"TestServiceInitDestroy").getInstance(null);
Assert.assertNotNull(initDestroy);
ModuleScopeInitOnlyComponent initOnly = (ModuleScopeInitOnlyComponent) scope.getContext("TestServiceInitOnly")
.getInstance(null);
Assert.assertNotNull(initOnly);
ModuleScopeDestroyOnlyComponent destroyOnly = (ModuleScopeDestroyOnlyComponent) scope.getContext(
"TestServiceDestroyOnly").getInstance(null);
Assert.assertNotNull(destroyOnly);
Assert.assertTrue(initDestroy.isInitialized());
Assert.assertTrue(initOnly.isInitialized());
Assert.assertFalse(initDestroy.isDestroyed());
Assert.assertFalse(destroyOnly.isDestroyed());
// expire module
scope.onEvent(new ModuleStop(this));