public void testEquivalenceOfScanResults(Table table, Scan scan1, Scan scan2) throws Exception {
    ResultScanner scanner1 = table.getScanner(scan1);
    ResultScanner scanner2 = table.getScanner(scan2);

    Result r1 = null;
    Result r2 = null;
    int count = 0;

    while ((r1 = scanner1.next()) != null) {
      r2 = scanner2.next();

      assertTrue(r2 != null);
      compareResults(r1, r2, "Comparing result #" + count);
      count++;
    }

    r2 = scanner2.next();
    assertTrue("r2: " + r2 + " Should be null", r2 == null);

    scanner1.close();
    scanner2.close();
  }
Ensure that the results returned from a scanner that retrieves all results in a single RPC call
matches the results that are returned from a scanner that must incrementally combine partial
results into complete results. A variety of scan configurations can be tested
hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java