private static FitNesseContext loadContext(Arguments arguments) throws Exception { FitNesseContext context = new FitNesseContext(); ComponentFactory componentFactory = new ComponentFactory(context.rootPath); context.port = arguments.getPort(); context.rootPath = arguments.getRootPath(); context.rootPageName = arguments.getRootDirectory(); context.rootPagePath = context.rootPath + "/" + context.rootPageName; context.root = componentFactory.getRootPage( FileSystemPage.makeRoot(context.rootPath, context.rootPageName)); context.responderFactory = new ResponderFactory(context.rootPagePath); context.logger = makeLogger(arguments); context.authenticator = makeAuthenticator(arguments.getUserpass(), componentFactory); context.htmlPageFactory = componentFactory.getHtmlPageFactory(new HtmlPageFactory()); extraOutput = componentFactory.loadResponderPlugins(context.responderFactory); extraOutput += componentFactory.loadWikiWidgetPlugins(); extraOutput += componentFactory.loadWikiWidgetInterceptors(); extraOutput += componentFactory.loadContentFilter(); WikiImportTestEventListener.register(); return context; }