private static boolean needsBalanceIdleRegion(int[] cluster) {
    return (Arrays.stream(cluster).anyMatch(x -> x > 1))
      && (Arrays.stream(cluster).anyMatch(x -> x < 1));
  }
Test BalancerDecision ring buffer using namedQueue interface
hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBalancerDecision.java