}
}
public void testColumnFormatter() {
HTMLTable table = getTable(4, 4);
ColumnFormatter formatter = table.getColumnFormatter();
Element colGroup = formatter.columnGroup;
// getElement.
Element col0 = formatter.getElement(0);
assertEquals(colGroup.getChild(0), col0);
Element col3 = formatter.getElement(3);
assertEquals(colGroup.getChild(3), col3);
try {
formatter.getElement(-1);
fail("Expected IndexOutOfBoundsException");
} catch (IndexOutOfBoundsException e) {
// Expected.
}
}