@Test
public void testCalculateHeader_NoRows() {

    ResultIterator<DataRow> rows = mock(ResultIterator.class);
    when(rows.hasNextRow()).thenReturn(false, false);
    when(rows.nextRow()).thenReturn(null, (DataRow) null);
    DataRowIterator it = new DataRowIterator(rows);
    RowAttribute[] header = it.calculateHeader();
    assertNotNull(header);
    assertEquals(0, header.length);
}