@Test
  public void testCancelChore() throws InterruptedException {
    final int period = 100;
    ScheduledChore chore = new DoNothingChore("chore", period);
    service.scheduleChore(chore);
    assertTrue(chore.isScheduled());

    chore.cancel(true);
    assertFalse(chore.isScheduled());
    assertTrue(service.getNumberOfScheduledChores() == 0);
  }
@param failThreshold Number of times the Chore fails when trying to execute initialChore
                     before succeeding.
hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java