@Test
  public void testComplex() {
    RegionSplitCalculator<SimpleRange> sc = new RegionSplitCalculator<>(cmp);
    sc.add(new SimpleRange(Bytes.toBytes("A"), Bytes.toBytes("Am")));
    sc.add(new SimpleRange(Bytes.toBytes("A"), Bytes.toBytes("C")));
    sc.add(new SimpleRange(Bytes.toBytes("Am"), Bytes.toBytes("C")));
    sc.add(new SimpleRange(Bytes.toBytes("D"), Bytes.toBytes("E")));
    sc.add(new SimpleRange(Bytes.toBytes("F"), Bytes.toBytes("G")));
    sc.add(new SimpleRange(Bytes.toBytes("B"), Bytes.toBytes("E")));
    sc.add(new SimpleRange(Bytes.toBytes("H"), Bytes.toBytes("I")));
    sc.add(new SimpleRange(Bytes.toBytes("A"), Bytes.toBytes("B")));

    Multimap<byte[], SimpleRange> regions = sc.calcCoverage();
    LOG.info("Something fairly complex");
    String res = dump(sc.getSplits(), regions);
    checkDepths(sc.getSplits(), regions, 3, 3, 3, 1, 2, 0, 1, 0, 1, 0);
    assertEquals("A:\t[A, Am]\t[A, B]\t[A, C]\t\n" + "Am:\t[A, B]\t[A, C]\t[Am, C]\t\n"
      + "B:\t[A, C]\t[Am, C]\t[B, E]\t\n" + "C:\t[B, E]\t\n" + "D:\t[B, E]\t[D, E]\t\n" + "E:\t\n"
      + "F:\t[F, G]\t\n" + "G:\t\n" + "H:\t[H, I]\t\n" + "I:\t\n", res);
  }
This dumps data in a visually reasonable way for visual debugging. It has the basic iteration
structure.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionSplitCalculator.java