@Test
public void testToHtml()
{

    assertEquals("<table>\n</table>",new Table().toHtml());
    assertEquals("<table id=\"foo\">\n</table>",new Table("foo",rows,null).toHtml());
    assertEquals("<table id=\"foo\">\n<caption>This is a table</caption>\n</table>",new Table("foo",rows,caption).toHtml());
    rows.add(rowOne);
    String tr1 = rowOne.toHtml() + "\n";
    assertEquals("<table id=\"foo\">\n<caption>This is a table</caption>\n" + tr1 + "</table>",new Table("foo",rows,caption).toHtml());
    rows.add(rowTwo);
    String tr2 = rowTwo.toHtml() + "\n";
    assertEquals("<table id=\"foo\">\n<caption>This is a table</caption>\n" + tr1 + tr2 + "</table>",new Table("foo",rows,caption).toHtml());
}