@Test
  public void testCleanerChore() throws Exception {
    boolean initialState = admin.isCleanerChoreEnabled().get();

    // flip state
    boolean prevState = admin.cleanerChoreSwitch(!initialState).get();

    // The previous state should be the original state we observed
    assertEquals(initialState, prevState);

    // Current state should be opposite of the original
    assertEquals(!initialState, admin.isCleanerChoreEnabled().get());

    // Reset it back to what it was
    prevState = admin.cleanerChoreSwitch(initialState).get();

    // The previous state should be the opposite of the initial state
    assertEquals(!initialState, prevState);

    // Current state should be the original state again
    assertEquals(initialState, admin.isCleanerChoreEnabled().get());
  }
Test the admin operations for Balancer, Normalizer, CleanerChore, and CatalogJanitor.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncToolAdminApi.java