protected ArrayListMultimap<String, ServerAndLoad>
    convertToGroupBasedMap(final Map<ServerName, List<RegionInfo>> serversMap) throws IOException {
    ArrayListMultimap<String, ServerAndLoad> loadMap = ArrayListMultimap.create();
    for (RSGroupInfo gInfo : getMockedGroupInfoManager().listRSGroups()) {
      Set<Address> groupServers = gInfo.getServers();
      for (Address hostPort : groupServers) {
        ServerName actual = null;
        for (ServerName entry : servers) {
          if (entry.getAddress().equals(hostPort)) {
            actual = entry;
            break;
          }
        }
        List<RegionInfo> regions = serversMap.get(actual);
        assertTrue("No load for " + actual, regions != null);
        loadMap.put(gInfo.getName(), new ServerAndLoad(actual, regions.size()));
      }
    }
    return loadMap;
  }
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-server/src/test/java/org/apache/hadoop/hbase/master/balancer/RSGroupableBalancerTestBase.java