@Test
  public void testStop() throws Exception {
    HRegionServer rs = TEST_UTIL.getMiniHBaseCluster().getRegionServer(0);
    assertFalse(rs.isStopped());
    admin.stopRegionServer(rs.getServerName()).join();
    assertTrue(rs.isStopped());

    HMaster master = TEST_UTIL.getMiniHBaseCluster().getMaster();
    assertFalse(master.isStopped());
    admin.stopMaster().join();
    assertTrue(master.isStopped());
  }
Only used to test stopMaster/stopRegionServer/shutdown methods.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncClusterAdminApi2.java