private static FitNesseContext loadContext(Arguments arguments)
throws Exception {
Builder builder = new Builder();
WikiPageFactory wikiPageFactory = new WikiPageFactory();
ComponentFactory componentFactory = new ComponentFactory(
arguments.getRootPath());
builder.port = arguments.getPort();
builder.rootPath = arguments.getRootPath();
builder.rootDirectoryName = arguments.getRootDirectory();
builder.pageTheme = componentFactory
.getProperty(ComponentFactory.THEME);
builder.defaultNewPageContent = componentFactory
.getProperty(ComponentFactory.DEFAULT_NEWPAGE_CONTENT);
builder.root = wikiPageFactory.makeRootPage(builder.rootPath,
builder.rootDirectoryName, componentFactory);
builder.logger = makeLogger(arguments);
builder.authenticator = makeAuthenticator(arguments.getUserpass(),
componentFactory);
FitNesseContext context = builder.createFitNesseContext();
extraOutput = componentFactory.loadPlugins(context.responderFactory,
wikiPageFactory);
extraOutput += componentFactory.loadWikiPage(wikiPageFactory);
extraOutput += componentFactory
.loadResponders(context.responderFactory);
extraOutput += componentFactory.loadSymbolTypes();
extraOutput += componentFactory.loadContentFilter();
extraOutput += componentFactory.loadSlimTables();
WikiImportTestEventListener.register();
return context;
}