@Test
  public void testTwoRules() throws IOException {
    // See {@link #before} above. It sets this.rulesFilename, and
    // HeterogeneousRegionCountCostFunction.HBASE_MASTER_BALANCER_HETEROGENEOUS_RULES_FILE,
    // in the configuration.
    // See {@link #before} above. It sets
    // HeterogeneousRegionCountCostFunction.HBASE_MASTER_BALANCER_HETEROGENEOUS_RULES_FILE,
    // in the configuration.
    createRulesFile(this.rulesFilename, Arrays.asList("^server1$ 10", "^server2 21"));
    this.costFunction = new HeterogeneousRegionCountCostFunction(HTU.getConfiguration());
    this.costFunction.loadRules();
    assertEquals(2, this.costFunction.getNumberOfRulesLoaded());
  }
Make a file for rules that is inside a temporary test dir named for the method so it doesn't
clash w/ other rule files.
hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerHeterogeneousCostRules.java