private void assertCellsSame(final CellScanner cellScanner, final Cell[] cells)
    throws IOException {
    int count = 0;
    while (cellScanner.advance()) {
      assertTrue(cells[count].equals(cellScanner.current()));
      count++;
    }
    assertEquals(cells.length, count);
  }
Run some tests to ensure Result acts like a proper CellScanner.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResult.java