### Question:
HtmlFormatter implements Formatter { public String getStringResult(final TestResult result) { if (result.type.equals(ResultType.RAW)) { return result.message; } StringBuffer sb = new StringBuffer(); sb.append("<div class=\"").append(result.type.getName()).append( "\"><a class=\"").append(result.type.getName()); String title = result.debugInfo; if (title == null) title = ""; if (!Utils.isBlankOrNull(title)) { sb.append("\" href=\"/_s_/dyn/").append(Command.LOG_HIGHLIGHT).append("?href=").append(title).append("#selected"); } sb.append("\" title=\"" + title + "\">").append(result.message.trim().replaceAll("\n", "<br/>")) .append(result.failureMsg != null ? "<br/>" + result.failureMsg.trim().replaceAll("\n", "<br/>") : "") .append("</a>" + " <span class='extra'> at " + DateFormat.getDateTimeInstance().format(result.time) + "</span>" + "</div>"); return sb.toString(); }  String getFileName(String scriptName); String getResultData(List<TestResult> listResult); String getHeader(); String getStringResult(final TestResult result); String getSummaryHeader(); String getSummaryData(TestSummary summary); String getSummaryFooter(); String getFooter(); String getSuiteLogFileName(); String getStartScript(); String getStopScript();  }### Answer:
@Test @Ignore("FIXME does not seem to be up to date") public void xtestGetStringResultForInfoResult() { String expected = "<div class=\"INFO\"><a class=\"INFO\" href=\"/_s_/dyn/Log_highlight?href=blah\">_click(_link(\"Form Test\"));</a></div>"; assertEquals(expected, formatter.getStringResult(ReportUtil .getInfoResult())); }
@Test public void testNewLinesConvertedToBRTag() { String expected = "Difference in array length:<br/>Expected Length<br/>Another line<br/>abc"; TestResult result = new TestResult("Difference in array length:\nExpected Length\nAnother line", ResultType.INFO, "abc", "abc"); String stringResult = formatter.getStringResult(result); assertTrue(stringResult.contains(expected)); }
@Test @Ignore("FIXME does not seem to be up to date") public void xtestGetStringResultForSuccessResult() { String expected = "<div class=\"SUCCESS\"><a class=\"SUCCESS\">_assertNotNull(_textarea(\"t2\"));</a></div>"; assertEquals(expected, formatter.getStringResult(ReportUtil .getSuccessResult())); }
@Test @Ignore("FIXME does not seem to be up to date") public void xtestGetStringResultForFailureResult() { String expected = "<div class=\"FAILURE\"><a class=\"FAILURE\">_call(testAccessors()); Assertion Failed.</a></div>"; assertEquals(expected, formatter.getStringResult(ReportUtil .getFailureResultWithoutDebugInfo())); }