@Test void testDeleteFails() { doThrow(new MolgenisDataException("Failed")).when(delegateRepository).delete(scheduledJob); when(scheduledJob.getId()).thenReturn("id"); try { scheduledJobRepositoryDecorator.delete(scheduledJob); fail("delete method should rethrow exception from delegate repository"); } catch (MolgenisDataException expected) { } verifyNoMoreInteractions(jobScheduler); }
@Override public void delete(ScheduledJob scheduledJob) { String entityId = scheduledJob.getId(); delegate().delete(scheduledJob); scheduler.unschedule(entityId); }
ScheduledJobRepositoryDecorator extends AbstractRepositoryDecorator<ScheduledJob> { @Override public void delete(ScheduledJob scheduledJob) { String entityId = scheduledJob.getId(); delegate().delete(scheduledJob); scheduler.unschedule(entityId); } }
ScheduledJobRepositoryDecorator extends AbstractRepositoryDecorator<ScheduledJob> { @Override public void delete(ScheduledJob scheduledJob) { String entityId = scheduledJob.getId(); delegate().delete(scheduledJob); scheduler.unschedule(entityId); } ScheduledJobRepositoryDecorator(
      Repository<ScheduledJob> delegateRepository,
      JobScheduler scheduler,
      JsonValidator jsonValidator); }
ScheduledJobRepositoryDecorator extends AbstractRepositoryDecorator<ScheduledJob> { @Override public void delete(ScheduledJob scheduledJob) { String entityId = scheduledJob.getId(); delegate().delete(scheduledJob); scheduler.unschedule(entityId); } ScheduledJobRepositoryDecorator(
      Repository<ScheduledJob> delegateRepository,
      JobScheduler scheduler,
      JsonValidator jsonValidator); @Override void update(ScheduledJob scheduledJob); @Override void update(Stream<ScheduledJob> scheduledJobs); @Override void delete(ScheduledJob scheduledJob); @Override void delete(Stream<ScheduledJob> jobs); @Override void deleteById(Object id); @Override void deleteAll(Stream<Object> ids); @Override void deleteAll(); @Override void add(ScheduledJob scheduledJob); @Override Integer add(Stream<ScheduledJob> jobs); }
ScheduledJobRepositoryDecorator extends AbstractRepositoryDecorator<ScheduledJob> { @Override public void delete(ScheduledJob scheduledJob) { String entityId = scheduledJob.getId(); delegate().delete(scheduledJob); scheduler.unschedule(entityId); } ScheduledJobRepositoryDecorator(
      Repository<ScheduledJob> delegateRepository,
      JobScheduler scheduler,
      JsonValidator jsonValidator); @Override void update(ScheduledJob scheduledJob); @Override void update(Stream<ScheduledJob> scheduledJobs); @Override void delete(ScheduledJob scheduledJob); @Override void delete(Stream<ScheduledJob> jobs); @Override void deleteById(Object id); @Override void deleteAll(Stream<Object> ids); @Override void deleteAll(); @Override void add(ScheduledJob scheduledJob); @Override Integer add(Stream<ScheduledJob> jobs);  }