public ServerName findSourceServerName(TableName tableName) throws Exception {
    SingleProcessHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
    int numOfRS = cluster.getNumLiveRegionServers();
    ServerName sourceServer = null;
    for (int i = 0; i < numOfRS; i++) {
      HRegionServer regionServer = cluster.getRegionServer(i);
      List<HRegion> hRegions = regionServer.getRegions().stream()
        .filter(hRegion -> hRegion.getRegionInfo().getTable().equals(tableName))
        .collect(Collectors.toList());
      if (hRegions.size() >= 2) {
        sourceServer = regionServer.getServerName();
        break;
      }
    }
    if (sourceServer == null) {
      throw new Exception(
        "This shouldn't happen, No RS found with more than 2 regions of table : " + tableName);
    }
    return sourceServer;
  }
Tests for Region Mover Load/Unload functionality with and without ack mode and also to test
exclude functionality useful for rack decommissioning
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionMover2.java