### Question:
PruningScheduler extends LifecycleAdapter { @Override public void start() { handle = scheduler.schedule( Group.RAFT_LOG_PRUNING, job, recurringPeriodMillis, MILLISECONDS ); } PruningScheduler( RaftLogPruner logPruner, JobScheduler scheduler, long recurringPeriodMillis, LogProvider
            logProvider ); @Override void start(); @Override void stop();  }### Answer:
@Test public void shouldScheduleTheCheckPointerJobOnStart() { PruningScheduler scheduler = new PruningScheduler( logPruner, jobScheduler, 20L, NullLogProvider.getInstance() ); assertNull( jobScheduler.getJob() ); scheduler.start(); assertNotNull( jobScheduler.getJob() ); verify( jobScheduler, times( 1 ) ).schedule( eq( Group.RAFT_LOG_PRUNING ), any( Runnable.class ), eq( 20L ), eq( TimeUnit.MILLISECONDS ) ); }
@Test public void shouldRescheduleTheJobAfterARun() throws Throwable { PruningScheduler scheduler = new PruningScheduler( logPruner, jobScheduler, 20L, NullLogProvider.getInstance() ); assertNull( jobScheduler.getJob() ); scheduler.start(); Runnable scheduledJob = jobScheduler.getJob(); assertNotNull( scheduledJob ); jobScheduler.runJob(); verify( jobScheduler, times( 2 ) ).schedule( eq( Group.RAFT_LOG_PRUNING ), any( Runnable.class ), eq( 20L ), eq( TimeUnit.MILLISECONDS ) ); verify( logPruner, times( 1 ) ).prune(); assertEquals( scheduledJob, jobScheduler.getJob() ); }