@Test
  public void testSplitAndMultiMerge() {
    conf.setInt(MERGE_MIN_REGION_SIZE_MB_KEY, 0);
    final TableName tableName = name.getTableName();
    final List<RegionInfo> regionInfos = createRegionInfos(tableName, 8);
    final Map<byte[], Integer> regionSizes =
      createRegionSizesMap(regionInfos, 3, 1, 1, 30, 9, 3, 1, 0);
    setupMocksForNormalizer(regionSizes, regionInfos);

    assertTrue(normalizer.isMergeEnabled());
    assertTrue(normalizer.isSplitEnabled());
    assertEquals(0, normalizer.getMergeMinRegionSizeMb());
    assertThat(normalizer.computePlansForTable(tableDescriptor),
      contains(new SplitNormalizationPlan(regionInfos.get(3), 30),
        new MergeNormalizationPlan.Builder().addTarget(regionInfos.get(0), 3)
          .addTarget(regionInfos.get(1), 1).addTarget(regionInfos.get(2), 1).build(),
        new MergeNormalizationPlan.Builder().addTarget(regionInfos.get(5), 3)
          .addTarget(regionInfos.get(6), 1).addTarget(regionInfos.get(7), 0).build()));
  }
Test the backward compatibility of the deprecated MIN_REGION_COUNT_KEY configuration in table
descriptor.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizer.java