MockHttpSession session = new MockHttpSession(servletContext);
MockHttpServletRequest request = new MockHttpServletRequest(session);
ExternalContext externalContext = new MockExternalContext(servletContext, request);
Map sessionAdaptor = new ServletRequestSessionMap(request);
Map requestAdaptor = new ServletRequestMap(request);
Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
installComponent(appContext, ConversationEntries.class);
installComponent(appContext, Manager.class);
appContext.set( Seam.getComponentName(Init.class), new Init() );
FacesLifecycle.beginRequest(externalContext);
Manager.instance().setLongRunningConversation(true);
testContext( new ApplicationContext( externalContext.getApplicationMap() ) );
testContext( new SessionContext(sessionAdaptor) );
testContext( new EventContext(requestAdaptor) );
testContext( new ServerConversationContext(sessionAdaptor, "1") );
testEquivalence( new ServerConversationContext(sessionAdaptor, "1"), new ServerConversationContext(sessionAdaptor, "1") );
testEquivalence( new SessionContext(sessionAdaptor), new SessionContext(sessionAdaptor) );
testEquivalence( new ApplicationContext( externalContext.getApplicationMap() ), new ApplicationContext( externalContext.getApplicationMap() ) );
testIsolation( new ServerConversationContext(sessionAdaptor, "1"), new ServerConversationContext(sessionAdaptor, "2") );
// testIsolation( new WebSessionContext(externalContext), new WebSessionContext( new MockExternalContext()) );
ServletLifecycle.endApplication();
}