@BeforeClass
  public static void setUp() throws Exception {
    UTIL.startMiniCluster(1);
    try (Table table = UTIL.createTable(TABLE_NAME, CF)) {
      for (int i = 0; i < COUNT; i++) {
        table.put(new Put(Bytes.toBytes(i)).addColumn(CF, CQ, Bytes.toBytes(i)));
      }
    }
    HRI = UTIL.getAdmin().getRegions(TABLE_NAME).get(0);
    CONN =
      (AsyncConnectionImpl) ConnectionFactory.createAsyncConnection(UTIL.getConfiguration()).get();
    STUB = CONN.getRegionServerStub(UTIL.getHBaseCluster().getRegionServer(0).getServerName());
  }
Testcase to make sure that we do not close scanners if ScanRequest.numberOfRows is zero. See
HBASE-18042 for more details.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScanWithoutFetchingData.java