### Question:
TextFormatter implements Formatter { @SuppressWarnings("unchecked") @Override public <T> T format(Results results) { StringBuilder sb = new StringBuilder(dateFormat()); sb.append(RULE); Set<Entry<String, List<ErrorResult>>> entries = results.getRawResults().entrySet(); for (Entry<String, List<ErrorResult>> entry : entries) { appendFileName(sb, entry.getKey()); appendErrors(sb, entry.getValue()); } return (T) sb.toString(); }  @SuppressWarnings("unchecked") @Override T format(Results results);  }### Answer:
@Test public void testFormat_report_is_okay() { Results results = createResults(); String text = instance.format(results); assertNotNull(text); assertTrue(text.contains("This is a line on a report that you may want to read ")); System.out.println(text); }