@Test
  public void testVerifyCacheCostFunctionEnabled() {
    conf.set(HConstants.BUCKET_CACHE_PERSISTENT_PATH_KEY, "/tmp/prefetch.persistence");

    CacheAwareLoadBalancer lb = new CacheAwareLoadBalancer();
    lb.loadConf(conf);

    assertTrue(Arrays.asList(lb.getCostFunctionNames())
      .contains(CacheAwareLoadBalancer.CacheAwareCostFunction.class.getSimpleName()));
  }
Data set to testCacheCost: [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] = size
of region cached on server
hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestCacheAwareLoadBalancerCostFunctions.java