@Test
  public void testDeletedTable() throws Exception {
    TableName tableNameToDelete = createTable(name.getMethodName() + "ToDelete");
    SingleProcessHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
    HRegionServer regionServer = cluster.getRegionServer(0);
    String rsName = regionServer.getServerName().getAddress().toString();
    RegionMover.RegionMoverBuilder rmBuilder =
      new RegionMover.RegionMoverBuilder(rsName, TEST_UTIL.getConfiguration()).ack(true)
        .maxthreads(8);
    try (Admin admin = TEST_UTIL.getAdmin(); RegionMover rm = rmBuilder.build()) {
      LOG.debug("Unloading {}", regionServer.getServerName());
      rm.unload();
      Assert.assertEquals(0, regionServer.getNumberOfOnlineRegions());
      LOG.debug("Successfully Unloaded, now delete table");
      admin.disableTable(tableNameToDelete);
      admin.deleteTable(tableNameToDelete);
      Assert.assertTrue(rm.load());
    }
  }
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