protected static RSGroupInfoManager getMockedGroupInfoManager() throws IOException {
    RSGroupInfoManager gm = Mockito.mock(RSGroupInfoManager.class);
    Mockito.when(gm.getRSGroup(Mockito.any())).thenAnswer(new Answer<RSGroupInfo>() {
      @Override
      public RSGroupInfo answer(InvocationOnMock invocation) throws Throwable {
        return groupMap.get(invocation.getArgument(0));
      }
    });
    Mockito.when(gm.listRSGroups()).thenReturn(Lists.newLinkedList(groupMap.values()));
    Mockito.when(gm.isOnline()).thenReturn(true);
    return gm;
  }
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