@Test
  public void testShutdownCancelsScheduledChores() throws InterruptedException {
    final int period = 100;
    ScheduledChore successChore1 = new DoNothingChore("sc1", period);
    ScheduledChore successChore2 = new DoNothingChore("sc2", period);
    ScheduledChore successChore3 = new DoNothingChore("sc3", period);
    assertTrue(service.scheduleChore(successChore1));
    assertTrue(successChore1.isScheduled());
    assertTrue(service.scheduleChore(successChore2));
    assertTrue(successChore2.isScheduled());
    assertTrue(service.scheduleChore(successChore3));
    assertTrue(successChore3.isScheduled());

    shutdownService(service);

    assertFalse(successChore1.isScheduled());
    assertFalse(successChore2.isScheduled());
    assertFalse(successChore3.isScheduled());
  }
ChoreServices should never have a core pool size that exceeds the number of chores that have
been scheduled with the service. For example, if 4 ScheduledChores are scheduled with a
ChoreService, the number of threads in the ChoreService's core pool should never exceed 4
hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java