public static void writeStoreFile(final StoreFileWriter writer, byte[] fam, byte[] qualifier)
    throws IOException {
    long now = EnvironmentEdgeManager.currentTime();
    try {
      for (char d = FIRST_CHAR; d <= LAST_CHAR; d++) {
        for (char e = FIRST_CHAR; e <= LAST_CHAR; e++) {
          byte[] b = new byte[] { (byte) d, (byte) e };
          writer.append(new KeyValue(b, fam, qualifier, now, b));
        }
      }
    } finally {
      writer.close();
    }
  }
Write a file and then assert that we can read from top and bottom halves using two
HalfMapFiles, as well as one HalfMapFile and one HFileLink file.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java