@Test
	public void test_simple_table() throws ParserConfigurationException, SAXException, IOException{
		/*
		 * Arrange
		 */
		HtmlView<?> view = new HtmlView();
		view.head().title("Dummy Table");

		HtmlTable<?> t = view.body()
		.heading(1, "Dummy Table")
		.hr()
		.div()
		.table();

		HtmlTr<?> headerRow = t.tr();
		headerRow.th().text("Id1");
		headerRow.th().text("Id2");
		headerRow.th().text("Id3");
		/*
		 * Act
		 */
		int[][] output = {{1,2,3},{4,5,6}, {7,8,9}};
		for (int i = 0; i < output.length; i++) {
			HtmlTr<?> tr = t.tr();
			for (int j = 0; j < output[i].length; j++) {
				tr.td().text(output[i][j] + "");
			}
		}
		ByteArrayOutputStream mem = new ByteArrayOutputStream();
		view.setPrintStream(new PrintStream(mem));
		view.write();
		/*
		 * Assert
		 */
		Element elem = DomUtils.getRootElement(mem.toByteArray());
		Assert.assertEquals(ElementType.HTML.toString(), elem.getNodeName());
		NodeList childNodes = elem.getChildNodes();
		Assert.assertEquals(ElementType.HEAD.toString(), childNodes.item(1).getNodeName());
		Assert.assertEquals(ElementType.BODY.toString(), childNodes.item(3).getNodeName());
		Node div = childNodes.item(3).getChildNodes().item(5);
		Assert.assertEquals(ElementType.DIV.toString(), div.getNodeName());
		Node table = div.getChildNodes().item(1);
		Assert.assertEquals(ElementType.TABLE.toString(), table.getNodeName());
		for (int i = 0; i < output.length; i++) {
			Node tr = table.getChildNodes().item(3 + i*2);
			Assert.assertEquals(ElementType.TR.toString(), tr.getNodeName());
			for (int j = 0; j < output[i].length; j++) {
				Node td = tr.getChildNodes().item(j*2 + 1);
				Assert.assertEquals("td", td.getNodeName());
				String val = td.getFirstChild().getNodeValue();
				Assert.assertEquals(output[i][j], Integer.parseInt(val));
			}
		}
		System.out.println(mem.toString());
	}