### Question:
DBStackJobInizializer implements JobInitializer { @Override public void initJobs() { Set<DBStack> dbStacks = checkedMeasure(() -> dbStackService.findAllForAutoSync(), LOGGER, ":::Auto sync::: db stacks are fetched from db in {}ms"); for (DBStack dbStack : dbStacks) { dbStackJobService.schedule(dbStack); } LOGGER.info("Auto syncer is inited with {} db stacks on start", dbStacks.size()); }  @Override void initJobs();  }### Answer:
@Test public void shouldDeleteAllJobsAndScheduleNewOnesForDbStacks() { DBStack dbStack = new DBStack(); Set<DBStack> dbStacks = Set.of(dbStack); when(dbStackService.findAllForAutoSync()).thenReturn(dbStacks); victim.initJobs(); verify(dbStackJobService).schedule(dbStack); }