### Question:
ReportXmlFormatter extends AbstractReportXmlFormatter<LintItem> { public static ReportXmlFormatter createForLinterError(final LintReport<LinterError> lintReport, final FormatterType formatterType) { return createInternal(lintReport, formatterType, new Function<LinterError, LintItem>() { @Override public LintItem apply(final LinterError input) throws Exception { notNull(input); return new LintItemAdapter(input); } }); } protected  ReportXmlFormatter(final LintReport<LintItem> lintReport, final FormatterType type); static ReportXmlFormatter create(final LintReport<LintItem> lintReport, final FormatterType formatterType); static ReportXmlFormatter createForLinterError(final LintReport<LinterError> lintReport,
      final FormatterType formatterType); static ReportXmlFormatter createForCssLintError(final LintReport<CssLintError> lintReport,
      final FormatterType formatterType);  }### Answer:
@Test public void shouldNotFailWhenNoErrorsAreReported() { final LintReport<LinterError> lintReport = new LintReport<LinterError>(); lintReport.addReport(new ResourceLintReport<LinterError>()); final StringWriter writer = new StringWriter(); ReportXmlFormatter.createForLinterError(lintReport, ReportXmlFormatter.FormatterType.LINT).write(new WriterOutputStream(writer)); assertNotNull(writer.toString()); }
@Test public void shouldNotFailWhenNoErrorsAreReported() { final LintReport<LinterError> lintReport = new LintReport<LinterError>(); lintReport.addReport(new ResourceLintReport<LinterError>()); final StringWriter writer = new StringWriter(); ReportXmlFormatter.createForLinterError(lintReport, ReportXmlFormatter.FormatterType.LINT).write(new WriterOutputStream(writer, Charset.defaultCharset())); assertNotNull(writer.toString()); }