@Test
  public void testHonorsPatternFilter() throws Exception {
    final TableName tn1 = TableName.valueOf(name.getMethodName() + "1");
    final TableName tn2 = TableName.valueOf(name.getMethodName() + "2");

    try {
      final int tn1RegionCount = createTableBegsSplit(tn1, true, false);
      final int tn2RegionCount = createTableBegsSplit(tn2, true, false);
      final NormalizeTableFilterParams ntfp =
        new NormalizeTableFilterParams.Builder().regex(".*[1]").build();

      assertFalse(admin.normalizerSwitch(true).get());
      assertTrue(admin.normalize(ntfp).get());
      waitForTableRegionCount(tn1, greaterThanOrEqualTo(tn1RegionCount + 1));

      // confirm that tn1 has (tn1RegionCount + 1) number of regions.
      // tn2 has tn2RegionCount number of regions because it fails filter.
      assertEquals(tn1 + " should have split.", tn1RegionCount + 1, getRegionCount(tn1));
      waitForTableRegionCount(tn2, comparesEqualTo(tn2RegionCount));
    } finally {
      dropIfExists(tn1);
      dropIfExists(tn2);
    }
  }
Test that disabling normalizer via table configuration is honored. There's no side-effect to
look for (other than a log message), so normalize two tables, one with the disabled setting,
and look for change in one and no change in the other.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizerOnCluster.java