}
}
protected MarinerPageContext createContexts(
MultipartPackageHandler handler) throws Exception {
TestMarinerRequestContext requestContext =
new TestMarinerRequestContext();
TestMarinerPageContext pageContext = new TestMarinerPageContext();
pageContext.setVolantis(volantis);
ApplicationContext appContext =
new MultipartApplicationContext(requestContext);
TestEnvironmentContext envContext =
new TestEnvironmentContext(getClass().getName() + ".message");
pageContext.pushRequestContext(requestContext);
ContextInternals.setEnvironmentContext(requestContext, envContext);
ContextInternals.setMarinerPageContext(requestContext, pageContext);
ContextInternals.setApplicationContext(requestContext, appContext);
appContext.setPackager(handler);
appContext.setAssetURLRewriter(handler);
appContext.getPackageResources().setContentType("multipart/mixed");
appContext.setEncodingManager(encodingManager);
envContext.setContextPathURL("http://localhost:" + port);
requestContext.setCharacterEncoding("iso-8859-1");
return pageContext;
}