@Test
  public void testUnloadRegions() throws Exception {
    Address decommission = rsservers.get(0);
    Address online = rsservers.get(1);
    String filename = new Path(TEST_UTIL.getDataTestDir(), "testRSGroupUnload").toString();
    RegionMoverBuilder builder =
      new RegionMoverBuilder(decommission.toString(), TEST_UTIL.getConfiguration());
    try (RegionMover rm = builder.filename(filename).ack(true).build()) {
      LOG.info("Unloading " + decommission.getHostname());
      rm.unload();
    }
    HRegionServer onlineRS = TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads().stream()
      .map(JVMClusterUtil.RegionServerThread::getRegionServer)
      .filter(rs -> rs.getServerName().getAddress().equals(online)).findFirst().get();
    assertEquals(9, onlineRS.getNumberOfOnlineRegions());
  }
Test for rsgroup enable, unloaded regions from decommissoned host of a rsgroup should be assigned
to those regionservers belonging to the same rsgroup.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionMoverWithRSGroupEnable.java