MockHttpSession session = new MockHttpSession(servletContext);
MockHttpServletRequest request = new MockHttpServletRequest(session);
ExternalContext externalContext = new MockExternalContext(servletContext, request);
ContextAdaptor sessionAdaptor = new ServletSessionImpl(session);
ContextAdaptor requestAdaptor = new ServletRequestImpl(request);
Context appContext = new FacesApplicationContext(externalContext);
appContext.set(
Seam.getComponentName(ConversationEntries.class) + ".component",
new Component(ConversationEntries.class, appContext)
);
appContext.set(
Seam.getComponentName(Manager.class) + ".component",
new Component(Manager.class)
);
appContext.set( Seam.getComponentName(Init.class), new Init() );
Lifecycle.beginRequest(externalContext);
Manager.instance().setLongRunningConversation(true);
testContext( new FacesApplicationContext(externalContext) );
testContext( new WebSessionContext(sessionAdaptor) );
testContext( new WebRequestContext(requestAdaptor) );