protected static MasterServices getMockedMaster() throws IOException {
    TableDescriptors tds = Mockito.mock(TableDescriptors.class);
    Mockito.when(tds.get(tables[0])).thenReturn(tableDescs.get(tables[0]));
    Mockito.when(tds.get(tables[1])).thenReturn(tableDescs.get(tables[1]));
    Mockito.when(tds.get(tables[2])).thenReturn(tableDescs.get(tables[2]));
    Mockito.when(tds.get(tables[3])).thenReturn(tableDescs.get(tables[3]));
    MasterServices services = Mockito.mock(HMaster.class);
    Mockito.when(services.getTableDescriptors()).thenReturn(tds);
    AssignmentManager am = Mockito.mock(AssignmentManager.class);
    Mockito.when(services.getAssignmentManager()).thenReturn(am);
    Mockito.when(services.getConfiguration()).thenReturn(conf);
    RSGroupInfoManager manager = getMockedGroupInfoManager();
    Mockito.when(services.getRSGroupInfoManager()).thenReturn(manager);
    return services;
  }
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