public static void assertCellsValue(Table table, Scan scan, byte[] expectedValue,
    int expectedCount) throws IOException {
    ResultScanner results = table.getScanner(scan);
    int count = 0;
    for (Result res : results) {
      List<Cell> cells = res.listCells();
      for (Cell cell : cells) {
        // Verify the value
        Assert.assertArrayEquals(expectedValue, CellUtil.cloneValue(cell));
        count++;
      }
    }
    results.close();
    Assert.assertEquals(expectedCount, count);
  }
Compare two Cells only for their row family qualifier value
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobTestUtil.java