private void checkSeekTo(byte[][] keys, HFileScanner scanner, int i) throws IOException {
    assertEquals("Failed to seek to key #" + i + " (" + Bytes.toStringBinary(keys[i]) + ")", 0,
      scanner.seekTo(KeyValueUtil.createKeyValueFromKey(keys[i])));
  }
Testing block index through the HFile writer/reader APIs. Allows to test setting index block
size through configuration, intermediate-level index blocks, and caching index blocks on write.
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java