private void checkKeyValue(String msgPrefix, byte[] expectedKey, byte[] expectedValue,
    ByteBuffer keyRead, ByteBuffer valueRead) {
    if (!msgPrefix.isEmpty()) msgPrefix += ". ";

    assertArrayEqualsBuffer(msgPrefix + "Invalid key", expectedKey, keyRead);
    assertArrayEqualsBuffer(msgPrefix + "Invalid value", expectedValue, valueRead);
  }
Check a key/value pair after it was read by the reader
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java