(FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
this.facesContext = facesContextFactory.getFacesContext(
this.servletContext, this.request, this.response, this.lifecycle);
((MockFacesContext) this.facesContext).setApplication(this.application);
ExceptionHandler exceptionHandler = ((ExceptionHandlerFactory)
FactoryFinder.getFactory(FactoryFinder.EXCEPTION_HANDLER_FACTORY)).getExceptionHandler();
this.facesContext.setExceptionHandler(exceptionHandler);
((MockFacesContext) this.facesContext).setExternalContext(
new MockExternalContext(this.servletContext, this.request, this.response));