private void consume(final CellScanner scanner, final int expected) throws IOException {
    int count = 0;
    while (scanner.advance()) {
      count++;
    }
    Assert.assertEquals(expected, count);
  }
Was overflowing if 100k or so lists of cellscanners to return.
hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellUtil.java