scope.register(threeCtx);
Object session = new Object();
ctx.setIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER, session);
scope.onEvent(new HttpSessionStart(this, session));
OrderedInitPojo one = (OrderedInitPojo) scope.getInstance(oneCtx);
Assert.assertNotNull(one);
Assert.assertEquals(1, one.getNumberInstantiated());
Assert.assertEquals(1, one.getInitOrder());
OrderedInitPojo two = (OrderedInitPojo) scope.getInstance(twoCtx);
Assert.assertNotNull(two);
Assert.assertEquals(2, two.getNumberInstantiated());
Assert.assertEquals(2, two.getInitOrder());
OrderedInitPojo three = (OrderedInitPojo) scope.getInstance(threeCtx);
Assert.assertNotNull(three);
Assert.assertEquals(3, three.getNumberInstantiated());
Assert.assertEquals(3, three.getInitOrder());
// expire module
scope.onEvent(new HttpSessionEnd(this, session));
Assert.assertEquals(0, one.getNumberInstantiated());
scope.stop();