@Test
  public void testEncodingWithOffheapKeyValue() throws IOException {
    // usually we have just block without headers, but don't complicate that
    try {
      List<ExtendedCell> kvs = generator.generateTestExtendedOffheapKeyValues(60, true);
      HFileContext meta = new HFileContextBuilder().withIncludesMvcc(includesMemstoreTS)
        .withIncludesTags(true).withHBaseCheckSum(true).withCompression(Algorithm.NONE)
        .withBlockSize(0).withChecksumType(ChecksumType.NULL).build();
      writeBlock(conf, kvs, meta, true);
    } catch (IllegalArgumentException e) {
      fail("No exception should have been thrown");
    }
  }
Test encoding with offheap keyvalue. This test just verifies if the encoders work with DBB and
does not use the getXXXArray() API
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java