HtmlViewFactory extends AbstractViewFactory { public static HtmlViewFactory create(final OutputStream stream, final URL cssURL) { if (stream instanceof PrintStream) { return new HtmlViewFactory((PrintStream) stream, cssURL); } else { return new HtmlViewFactory(createPrintStream(stream, DEFAULT_CHARSET), cssURL); } } HtmlViewFactory(final PrintStream stream, final URL cssUrl); static HtmlViewFactory create(final OutputStream stream, final URL cssURL); @Override ViewableContainer createView(final String id, final String title); @Override ViewableContainer createReportDetails(); @Override ViewableContainer createSection(final String id, final String title); @Override Viewable createSpecificationItem(final LinkedSpecificationItem item); @Override Viewable createTraceSummary(final Trace trace); @Override ViewableContainer createReportSummary(); @Override Viewable createTableOfContents(final ViewableContainer from);  }
@Test void testCreateFactoryWithPrintStream() throws UnsupportedEncodingException { factory = HtmlViewFactory.create(new PrintStream(outputStream, true, StandardCharsets.UTF_8), HtmlReport.getCssUrl()); assertThat(factory, notNullValue()); }