@Test
  public void testSizeLimitShufflesPlans() {
    conf.setLong(CUMULATIVE_SIZE_LIMIT_MB_KEY, 10);
    final TableName tableName = name.getTableName();
    final List<RegionInfo> regionInfos = createRegionInfos(tableName, 4);
    final Map<byte[], Integer> regionSizes = createRegionSizesMap(regionInfos, 3, 3, 3, 3);
    setupMocksForNormalizer(regionSizes, regionInfos);
    when(tableDescriptor.getNormalizerTargetRegionSize()).thenReturn(1L);
    normalizer = spy(normalizer);

    assertTrue(normalizer.isSplitEnabled());
    assertTrue(normalizer.isMergeEnabled());
    List<NormalizationPlan> computedPlans = normalizer.computePlansForTable(tableDescriptor);
    assertThat(computedPlans, hasSize(4));
    verify(normalizer, times(1)).shuffleNormalizationPlans(anyList());
  }
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