@Test
  public void testAdditionalCostFunction() {
    conf.set(StochasticLoadBalancer.COST_FUNCTIONS_COST_FUNCTIONS_KEY,
      DummyCostFunction.class.getName());

    loadBalancer.onConfigurationChange(conf);
    assertTrue(Arrays.asList(loadBalancer.getCostFunctionNames())
      .contains(DummyCostFunction.class.getSimpleName()));
  }
Data set for testLocalityCost: [test][0][0] = mapping of server to number of regions it hosts
[test][region + 1][0] = server that region is hosted on [test][region + 1][server + 1] =
locality for region on server
hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancer.java