### Question:
HtmlLogTableFormatter { public static String formatAsBootstrap2Table(final String logData, final String caption) { if (logData == null) { throw new IllegalArgumentException("null logData"); } if (caption == null) { throw new IllegalArgumentException("null caption"); } StringBuilder sb = new StringBuilder(); sb.append("<table class=\"table table-striped\">"); sb.append("<caption>"); sb.append(caption); sb.append("</caption>"); sb.append("<tbody>"); String[] result = logData.split("\\n"); for (String element : result) { sb.append("<tr><td>"); sb.append(element); sb.append("</td></tr>"); } sb.append("</tbody>"); sb.append("</table>"); return sb.toString(); }  static String formatStackTraceAsBootstrap2Table(final Exception exception); static String formatAsBootstrap2Table(final String logData, final String caption);  }### Answer:
@Test public void testTabelizeBootstrap2() { String logData = "this\nis\na\nlog"; String actual = HtmlLogTableFormatter.formatAsBootstrap2Table(logData, ""); Assert.assertNotNull("did not build log table", actual); Assert.assertEquals( "<table class=\"table table-striped\"><caption></caption><tbody><tr><td>this</td></tr><tr><td>is</td></tr><tr><td>a</td></tr><tr><td>log</td></tr></tbody></table>", actual); }