assert appName != null;
assert InternalUtils.isNonBlank(contextPath);
SymbolProvider provider = new SingleKeySymbolProvider(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM, appPackage);
TapestryAppInitializer initializer = new TapestryAppInitializer(logger, provider, appName,
null);
initializer.addModules(PageTesterModule.class);
initializer.addModules(moduleClasses);
initializer.addModules(provideExtraModuleDefs());
registry = initializer.createRegistry();
request = registry.getService(TestableRequest.class);
response = registry.getService(TestableResponse.class);
ApplicationGlobals globals = registry.getObject(ApplicationGlobals.class, null);
globals.storeContext(new PageTesterContext(contextPath));
registry.performRegistryStartup();
requestHandler = registry.getService("RequestHandler", RequestHandler.class);
request.setLocale(Locale.ENGLISH);
initializer.announceStartup();
}