int idx = 0;
Iterator<RowModel> i = cellSet.getRows().iterator();
for (boolean done = true; done; row++) {
done = i.hasNext();
if (!done) break;
RowModel rowModel = i.next();
List<CellModel> cells = rowModel.getCells();
if (cells.isEmpty()) break;
assertTrue("Scanned too many keys! Only expected " + kvs.length +
" total but already scanned " + (cells.size() + idx),
kvs.length >= idx + cells.size());
for (CellModel cell: cells) {
assertTrue("Row mismatch",
Bytes.equals(rowModel.getKey(), kvs[idx].getRow()));
byte[][] split = KeyValue.parseColumn(cell.getColumn());
assertTrue("Family mismatch",
Bytes.equals(split[0], kvs[idx].getFamily()));
assertTrue("Qualifier mismatch",
Bytes.equals(split[1], kvs[idx].getQualifier()));