@Test
  public void testHonorsMergeRequestMaxNumberOfRegionsCountDefault() {
    conf.setBoolean(SPLIT_ENABLED_KEY, false);
    conf.setInt(MERGE_MIN_REGION_COUNT_KEY, 1);
    conf.setInt(MERGE_MIN_REGION_SIZE_MB_KEY, 0);
    final TableName tableName = name.getTableName();
    final List<RegionInfo> regionInfos = createRegionInfos(tableName, 3);
    final Map<byte[], Integer> regionSizes = createRegionSizesMap(regionInfos, 0, 0, 0);
    setupMocksForNormalizer(regionSizes, regionInfos);
    assertEquals(100, normalizer.getMergeRequestMaxNumberOfRegionsCount());
    List<NormalizationPlan> plans = normalizer.computePlansForTable(tableDescriptor);
    assertThat(plans, contains(new MergeNormalizationPlan.Builder().addTarget(regionInfos.get(0), 0)
      .addTarget(regionInfos.get(1), 0).addTarget(regionInfos.get(2), 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