private void assignRegions(List<RegionInfo> regions, List<ServerName> servers,
    Map<ServerName, List<RegionInfo>> clusterState) {
    for (int i = 0; i < regions.size(); i++) {
      ServerName sn = servers.get(i % servers.size());
      List<RegionInfo> regionsOfServer = clusterState.get(sn);
      if (regionsOfServer == null) {
        regionsOfServer = new ArrayList<>(10);
        clusterState.put(sn, regionsOfServer);
      }

      regionsOfServer.add(regions.get(i));
    }
  }
Asserts a valid retained assignment plan.
<p>
Must meet the following conditions:
<ul>
<li>Every input region has an assignment, and to an online server
<li>If a region had an existing assignment to a server with the same address a a currently
online server, it will be assigned to it
</ul>
hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/TestBaseLoadBalancer.java