EventContext ctx = new EventContextImpl();
RequestScopeContext scope = new RequestScopeContext(ctx);
scope.registerFactories(MockContextFactory.createWiredContexts(Scope.REQUEST,scope));
scope.start();
Object request = new Object();
scope.onEvent(new RequestStart(this,request));
OrderedDependentPojo source = (OrderedDependentPojo) scope.getContext("source").getInstance(null);
assertNotNull(source.getPojo());
// expire module
assertEquals(2,source.getNumberInstantiated());
scope.onEvent(new RequestEnd(this,request));