@Test
  public void test() throws IOException {
    try (Table t = TEST_UTIL.getConnection().getTable(TABLE)) {
      // populate a row with bunch of columns and large values
      // to cause scan to return partials
      byte[] val = makeLargeValue(VALUE_SIZE);
      Put p = new Put(ROW);
      for (int i = 0; i < NUM_COLUMNS; i++) {
        p.addColumn(CF, Bytes.toBytes(Integer.toString(i)), val);
      }
      t.put(p);

      Scan scan = new Scan();
      scan.withStartRow(ROW);
      scan.withStopRow(ROW, true);
      scan.setAllowPartialResults(true);
      scan.setMaxResultSize(2L * 1024 * 1024);
      scan.readVersions(1);
      ResultScanner scanner = t.getScanner(scan);

      int nResults = 0;
      int nCells = 0;
      for (Result result = scanner.next(); (result != null); result = scanner.next()) {
        nResults++;
        nCells += result.listCells().size();
      }
      assertEquals(NUM_COLUMNS, nCells);
      assertTrue(nResults < 5);
    }
  }
Testcase for HBASE-21032, where use the wrong readType from a Scan instance which is actually a
get scan and cause returning only 1 cell per rpc call.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestGetScanPartialResult.java