Map<ServerName, ServerMetrics> serversForTable(String tableName) {
    Map<ServerName, ServerMetrics> serverLoadHashMap = new HashMap<>();
    for (Map.Entry<ServerName, ServerMetrics> server : TEST_UTIL.getMiniHBaseCluster().getMaster()
      .getServerManager().getOnlineServers().entrySet()) {
      for (Map.Entry<byte[], RegionMetrics> region : server.getValue().getRegionMetrics()
        .entrySet()) {
        if (region.getValue().getNameAsString().equals(tableName)) {
          // this server hosts a region of tableName: add this server..
          serverLoadHashMap.put(server.getKey(), server.getValue());
          // .. and skip the rest of the regions that it hosts.
          break;
        }
      }
    }
    return serverLoadHashMap;
  }
return the subset of all regionservers (actually returns set of ServerLoads) which host some
region in a given table. used by assertAllRegionServers() below to test reporting of loaded
coprocessors.
@param tableName : given table.
@return subset of all servers.
hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestClassLoading.java