private void honorsMinimumRegionCount(String confKey) {
    conf.setInt(confKey, 1);
    final TableName tableName = name.getTableName();
    final List<RegionInfo> regionInfos = createRegionInfos(tableName, 3);
    // create a table topology that results in both a merge plan and a split plan. Assert that the
    // merge is only created when the when the number of table regions is above the region count
    // threshold, and that the split plan is create in both cases.
    final Map<byte[], Integer> regionSizes = createRegionSizesMap(regionInfos, 1, 1, 10);
    setupMocksForNormalizer(regionSizes, regionInfos);
    assertEquals(1, normalizer.getMergeMinRegionCount());

    List<NormalizationPlan> plans = normalizer.computePlansForTable(tableDescriptor);
    assertThat(plans,
      contains(new SplitNormalizationPlan(regionInfos.get(2), 10),
        new MergeNormalizationPlan.Builder().addTarget(regionInfos.get(0), 1)
          .addTarget(regionInfos.get(1), 1).build()));

    // have to call setupMocks again because we don't have dynamic config update on normalizer.
    conf.setInt(confKey, 4);
    setupMocksForNormalizer(regionSizes, regionInfos);
    assertEquals(4, normalizer.getMergeMinRegionCount());
    assertThat(normalizer.computePlansForTable(tableDescriptor),
      contains(new SplitNormalizationPlan(regionInfos.get(2), 10)));
  }
Test the backward compatibility of the deprecated MIN_REGION_COUNT_KEY configuration.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizer.java