@Test
  public void testChoreSchedule() throws Exception {
    this.hMaster = cluster.getMaster();

    this.regionsRecoveryConfigManager = new RegionsRecoveryConfigManager(this.hMaster);
    // not yet scheduled
    assertFalse(
      hMaster.getChoreService().isChoreScheduled(regionsRecoveryConfigManager.getChore()));

    this.regionsRecoveryConfigManager.onConfigurationChange(conf);
    // not yet scheduled
    assertFalse(
      hMaster.getChoreService().isChoreScheduled(regionsRecoveryConfigManager.getChore()));

    conf.setInt("hbase.master.regions.recovery.check.interval", 10);
    this.regionsRecoveryConfigManager.onConfigurationChange(conf);
    // not yet scheduled - missing config: hbase.regions.recovery.store.file.ref.count
    assertFalse(
      hMaster.getChoreService().isChoreScheduled(regionsRecoveryConfigManager.getChore()));

    conf.setInt("hbase.regions.recovery.store.file.ref.count", 10);
    this.regionsRecoveryConfigManager.onConfigurationChange(conf);
    // chore scheduled
    assertTrue(hMaster.getChoreService().isChoreScheduled(regionsRecoveryConfigManager.getChore()));

    conf.setInt("hbase.regions.recovery.store.file.ref.count", 20);
    this.regionsRecoveryConfigManager.onConfigurationChange(conf);
    // chore re-scheduled
    assertTrue(hMaster.getChoreService().isChoreScheduled(regionsRecoveryConfigManager.getChore()));

    conf.setInt("hbase.regions.recovery.store.file.ref.count", 20);
    this.regionsRecoveryConfigManager.onConfigurationChange(conf);
    // chore scheduling untouched
    assertTrue(hMaster.getChoreService().isChoreScheduled(regionsRecoveryConfigManager.getChore()));

    conf.unset("hbase.regions.recovery.store.file.ref.count");
    this.regionsRecoveryConfigManager.onConfigurationChange(conf);
    // chore un-scheduled
    assertFalse(
      hMaster.getChoreService().isChoreScheduled(regionsRecoveryConfigManager.getChore()));
  }
Test for Regions Recovery Config Manager
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestRegionsRecoveryConfigManager.java