@Test
  public void testReadingCellsFromHFile() throws Exception {
    TableName tableName = TableName.valueOf(TABLE_NAME);
    MobSnapshotTestingUtils.createMobTable(UTIL, tableName, 1, FAMILY);
    LOG.info("Create an mob table {} successfully.", tableName);

    int expectedRows = 500;
    SnapshotTestingUtils.loadData(UTIL, tableName, expectedRows, FAMILY);
    LOG.info("Load 500 rows data into table {} successfully.", tableName);

    // Flush all the data into HFiles.
    try (Admin admin = UTIL.getConnection().getAdmin()) {
      admin.flush(tableName);
    }

    // Scan the rows
    MobSnapshotTestingUtils.verifyMobRowCount(UTIL, tableName, expectedRows);

    // Reversed scan the rows
    int rows = 0;
    try (Table table = UTIL.getConnection().getTable(tableName)) {
      try (ResultScanner scanner = table.getScanner(new Scan().setReversed(true))) {
        for (Result res; (res = scanner.next()) != null;) {
          rows++;
          for (Cell cell : res.listCells()) {
            Assert.assertTrue(CellUtil.cloneValue(cell).length > 0);
          }
        }
      }
    }
    Assert.assertEquals(expectedRows, rows);
  }
Test the MOB feature when enable RPC ByteBuffAllocator (HBASE-22122)
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobWithByteBuffAllocator.java