@Test
public void testGetCellRect() throws Exception {

    // square table, both rows and columns defined:
    DynamicTableModel model = new DynamicTableModel(5, 5);
    RectF tableRect = new RectF(0, 0, 1000, 2000);
    RectF cellRect = model.getCellRect(tableRect, 10);
    assertEquals(200f, cellRect.width());
    // only rows defined:
    model = new DynamicTableModel(5, 0);
    cellRect = model.getCellRect(tableRect, 10);
    assertEquals(200f, cellRect.width());
    // only columns defined:
    model = new DynamicTableModel(0, 5);
    cellRect = model.getCellRect(tableRect, 10);
    assertEquals(400f, cellRect.height());
}