facesContext.getExternalContext().getApplicationMap().put(MyfacesConfig.class.getName(), config);
request.addHeader("Accept", "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, " +
"image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*"); //IE8
HtmlRenderKitImpl renderKit = new HtmlRenderKitImpl();
StringWriter writer = new StringWriter();
HtmlResponseWriterImpl responseWriter = (HtmlResponseWriterImpl) renderKit.createResponseWriter(writer, null, null);
Assert.assertEquals(ContentTypeUtils.HTML_CONTENT_TYPE, responseWriter.getContentType());
Assert.assertEquals(ContentTypeUtils.HTML_CONTENT_TYPE, responseWriter.getWriterContentTypeMode());
}