Application app = mockControl.createMock(Application.class);
facesctx.setApplication(app);
ELContextEvent event = mockControl.createMock(ELContextEvent.class);
expect(event.getELContext()).andReturn(elctx);
elctx.putContext(eq(FacesContext.class), same(facesctx));
ELContextListener elctxListener = mockControl.createMock(ELContextListener.class);
expect(app.getELContextListeners()).andReturn(new ELContextListener[] { elctxListener });
elctxListener.contextCreated(same(event));
mockControl.replay();
listener.contextCreated(event);
mockControl.verify();
}