@Test
public void testBalanceAllTables() throws Exception {

    List<ServerName> serverNameList;
    List<HRegionInfo> regionInfoList;
    // create tables
    String tableName2 = createAdditionalTable(TestBase.tableName + "2");
    String tableName3 = createAdditionalTable(TestBase.tableName + "3");
    // move all regions to rs1
    serverNameList = getServerNameList();
    ServerName rs1 = serverNameList.get(0);
    regionInfoList = getRegionInfoList(tableName);
    regionInfoList.addAll(getRegionInfoList(tableName2));
    regionInfoList.addAll(getRegionInfoList(tableName3));
    for (HRegionInfo hRegionInfo : regionInfoList) {
        move(hRegionInfo, rs1);
    }
    Assert.assertEquals(3, getRegionInfoList(rs1, tableName).size() + getRegionInfoList(rs1, tableName2).size() + getRegionInfoList(rs1, tableName3).size());
    String[] argsParam = {"zookeeper", ".*", "st", "--force-proceed", "--test"};
    Args args = new ManagerArgs(argsParam);
    Assert.assertEquals("zookeeper", args.getZookeeperQuorum());
    Balance command = new Balance(admin, args);
    command.run();
    // check regions balanced
    Assert.assertNotEquals(3, getRegionInfoList(rs1, tableName).size() + getRegionInfoList(rs1, tableName2).size() + getRegionInfoList(rs1, tableName3).size());
}