static boolean checkResult(Result r, ImmutableBytesWritable key, byte[] expectedKey,
    byte[] expectedValue) {
    assertEquals(0, key.compareTo(expectedKey));
    Map<byte[], byte[]> vals = r.getFamilyMap(FAMILY);
    byte[] value = vals.values().iterator().next();
    assertTrue(Arrays.equals(value, expectedValue));
    return true; // if succeed
  }
Verify that the result and key have expected values.
@param r             single row result
@param key           the row key
@param expectedKey   the expected key
@param expectedValue the expected value
@return true if the result contains the expected key and value, false otherwise.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestTableInputFormat.java