@Test
public void testSingleRowIteration() throws Exception {

    // square table, both rows and columns defined:
    TableModel model = new DynamicTableModel(0, 1);
    RectF tableRect = new RectF(0, 0, 1000, 1000);
    int createdCells = 4;
    Iterator<RectF> it = model.getIterator(tableRect, createdCells);
    // 2x2 fixed:
    // cell 0 (top-left
    RectF cellRect = it.next();
    assertEquals(250f, cellRect.width());
    assertEquals(1000f, cellRect.height());
    assertEquals(0f, cellRect.left);
    assertEquals(0f, cellRect.top);
    assertEquals(250f, cellRect.right);
    assertEquals(1000f, cellRect.bottom);
    // cell 1
    cellRect = it.next();
    assertEquals(250f, cellRect.width());
    assertEquals(1000f, cellRect.height());
    assertEquals(250f, cellRect.left);
    assertEquals(0f, cellRect.top);
    assertEquals(500f, cellRect.right);
    assertEquals(1000f, cellRect.bottom);
    // cell 2
    cellRect = it.next();
    assertEquals(250f, cellRect.width());
    assertEquals(1000f, cellRect.height());
    assertEquals(500f, cellRect.left);
    assertEquals(0f, cellRect.top);
    assertEquals(750f, cellRect.right);
    assertEquals(1000f, cellRect.bottom);
    // cell 3
    cellRect = it.next();
    assertEquals(250f, cellRect.width());
    assertEquals(1000f, cellRect.height());
    assertEquals(750f, cellRect.left);
    assertEquals(0f, cellRect.top);
    assertEquals(1000f, cellRect.right);
    assertEquals(1000f, cellRect.bottom);
}