private void verifyScanFullNoValues(Scan s, KeyValue[] kvs, boolean useLen) throws IOException {
    InternalScanner scanner = this.region.getScanner(s);
    List<Cell> results = new ArrayList<>();
    int row = 0;
    int idx = 0;
    for (boolean more = true; more; row++) {
      more = scanner.next(results);
      Arrays.sort(results.toArray(new Cell[results.size()]), CellComparator.getInstance());
      if (results.isEmpty()) break;
      assertTrue(
        "Scanned too many keys! Only expected " + kvs.length + " total but already scanned "
          + (results.size() + idx)
          + (results.isEmpty() ? "" : "(" + results.get(0).toString() + ")"),
        kvs.length >= idx + results.size());
      for (Cell kv : results) {
        LOG.info("row=" + row + ", result=" + kv.toString() + ", match=" + kvs[idx].toString());

        assertTrue("Row mismatch", CellUtil.matchingRows(kv, kvs[idx]));
        assertTrue("Family mismatch", CellUtil.matchingFamily(kv, kvs[idx]));
        assertTrue("Qualifier mismatch", CellUtil.matchingQualifier(kv, kvs[idx]));
        assertFalse("Should not have returned whole value", CellUtil.matchingValue(kv, kvs[idx]));
        if (useLen) {
          assertEquals("Value in result is not SIZEOF_INT", Bytes.SIZEOF_INT, kv.getValueLength());
          LOG.info("idx = " + idx + ", len=" + kvs[idx].getValueLength() + ", actual="
            + Bytes.toInt(CellUtil.cloneValue(kv)));
          assertEquals("Scan value should be the length of the actual value. ",
            kvs[idx].getValueLength(), Bytes.toInt(CellUtil.cloneValue(kv)));
          LOG.info("good");
        } else {
          assertEquals("Value in result is not empty", 0, kv.getValueLength());
        }
        idx++;
      }
      results.clear();
    }
    LOG.info("Looked at " + row + " rows with " + idx + " keys");
    assertEquals("Expected " + kvs.length + " total keys but scanned " + idx, kvs.length, idx);
  }
Tests the the {@link WhileMatchFilter} works in combination with a {@link Filter} that uses the
{@link Filter#filterCell(Cell)} method. See HBASE-2258.
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java