protected static Map<TableName, TableDescriptor> constructTableDesc(boolean hasBogusTable) {
    Map<TableName, TableDescriptor> tds = new HashMap<>();
    Random rand = ThreadLocalRandom.current();
    int index = rand.nextInt(groups.length);
    for (int i = 0; i < tables.length; i++) {
      int grpIndex = (i + index) % groups.length;
      String groupName = groups[grpIndex];
      TableDescriptor htd =
        TableDescriptorBuilder.newBuilder(tables[i]).setRegionServerGroup(groupName).build();
      tds.put(htd.getTableName(), htd);
    }
    if (hasBogusTable) {
      tds.put(table0, TableDescriptorBuilder.newBuilder(table0).setRegionServerGroup("").build());
    }
    return tds;
  }
Construct table descriptors evenly distributed between the groups.
@param hasBogusTable there is a table that does not determine the group
@return the list of table descriptors
hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/RSGroupableBalancerTestBase.java