* Create the context (if needed)
*/
protected Context createContext() {
if (context == null) {
RuntimeFactory runtimeFactory = new RuntimeFactoryStandalone() {
@Override
public Context initContext(Application application,
Object request, Object response) {
Context context = super.initContext(application, request,
response);
TestEnvironmentFactory.getEnvironment().decorateContext(
context);
return context;
}
};
application = runtimeFactory.initApplication(null);
context = Context.init(application, null, null);
}
return context;
}