"TestServiceInitDestroy").getInstance(null);
Assert.assertNotNull(initDestroy);
SessionScopeInitOnlyComponent initOnly = (SessionScopeInitOnlyComponent) scope.getContext("TestServiceInitOnly")
.getInstance(null);
Assert.assertNotNull(initOnly);
SessionScopeDestroyOnlyComponent destroyOnly = (SessionScopeDestroyOnlyComponent) scope.getContext(
"TestServiceDestroyOnly").getInstance(null);
Assert.assertNotNull(destroyOnly);
Assert.assertTrue(initDestroy.isInitialized());
Assert.assertTrue(initOnly.isInitialized());
Assert.assertFalse(initDestroy.isDestroyed());
Assert.assertFalse(destroyOnly.isDestroyed());
// end request
ctx.clearIdentifier(HttpSessionEvent.HTTP_IDENTIFIER);
// expire session
scope.onEvent(new HttpSessionEnd(this,session));
Assert.assertTrue(initDestroy.isDestroyed());
Assert.assertTrue(destroyOnly.isDestroyed());
scope.stop();
}