### Question:
GroupingRecoveryCleanupWorkCollector extends RecoveryCleanupWorkCollector { @Override public void add( CleanupJob job ) { if ( started ) { throw new IllegalStateException( "Index clean jobs can't be added after collector start." ); } jobs.add( job ); } GroupingRecoveryCleanupWorkCollector( JobScheduler jobScheduler ); @Override void init(); @Override void add( CleanupJob job ); @Override void start(); @Override void shutdown();  }### Answer:
@Test void shouldNotAcceptJobsBeforeInit() { collector.add( new DummyJob( "A", new ArrayList<>() ) ); assertThrows( IllegalStateException.class, collector::init ); }