private void reportTestSuite(String testSuiteName, TestSetStats testSuiteData) {
   // report entries here are expected to be either "error" or "skipped"
   if (testSuiteData.getReportEntries().size() > 0) {
     ReportEntryType reportEntryType;
     if (testSuiteData.getErrors() > 0) {
       reportEntryType = ReportEntryType.error;
     } else {
       reportEntryType = ReportEntryType.skipped;
     }
     WrappedReportEntry testSuite = testSuite(testSuiteName, reportEntryType);
     StatelessXmlReporter reporter = new StatelessXmlReporter(reportsDirectory, null, false);
     reporter.testSetCompleted(testSuite, testSuiteData);
   }
 }
  private void reportExceptions(List<Exception> exceptionList, List<Exception> ignoredExceptions) {
    Multimap<Class<? extends Exception>, Exception> exceptionMultimap = LinkedListMultimap.create();
    for (Exception exception : exceptionList) {
      exceptionMultimap.put(exception.getClass(), exception);
    }
    for (Exception exception : ignoredExceptions) {
      exceptionMultimap.put(exception.getClass(), exception);
    }

    for (Class<? extends Exception> exceptionType : exceptionMultimap.keySet()) {
      TestSetStats testSuiteData = new TestSetStats(false, false);
      for (Exception exception : exceptionMultimap.get(exceptionType)) {
        if (ignoredExceptions.contains(exception)) {
          testSuiteData.testSkipped(testCase(exception, ReportEntryType.skipped));
        } else {
          testSuiteData.testError(testCase(exception, ReportEntryType.error));
        }
      }
      reportTestSuite(exceptionType.getSimpleName(), testSuiteData);
    }
  }
 private void reportTestCase(
     String type,
     ReportEntryType reportEntryType,
     String message,
     String description,
     TestSetStats testSuite) {
   if (reportEntryType == ReportEntryType.error) {
     testSuite.testError(
         testCase(
             type,
             ReportEntryType.error,
             message,
             description == null ? null : description.toString()));
   } else {
     testSuite.testSkipped(
         testCase(
             type,
             ReportEntryType.skipped,
             message,
             description == null ? null : description.toString()));
   }
 }