{
this.mockHttpSession = new MockHttpSession();
this.servletContextEvent = new MockServletContextEvent();
WebBeansContext webBeansContext = getWebBeansContext();
ContextFactory contextFactory = webBeansContext.getContextFactory();
contextFactory.initRequestContext(null);
contextFactory.initSessionContext(mockHttpSession);
contextFactory.initConversationContext(null);
contextFactory.initApplicationContext(this.servletContextEvent.getServletContext());
}