static void assertBuffersEqual(ByteBuff expectedBuffer, ByteBuff actualBuffer,
    Compression.Algorithm compression, DataBlockEncoding encoding, boolean pread) {
    if (!actualBuffer.equals(expectedBuffer)) {
      int prefix = 0;
      int minLimit = Math.min(expectedBuffer.limit(), actualBuffer.limit());
      while (prefix < minLimit && expectedBuffer.get(prefix) == actualBuffer.get(prefix)) {
        prefix++;
      }

      fail(String.format("Content mismatch for %s, commonPrefix %d, expected %s, got %s",
        buildMessageDetails(compression, encoding, pread), prefix,
        nextBytesToStr(expectedBuffer, prefix), nextBytesToStr(actualBuffer, prefix)));
    }
  }
Test encoding/decoding data blocks.
@throws IOException a bug or a problem with temporary files.
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java