@Test void testDeleteForbidden() { JobExecution jobExecution = mock(JobExecution.class); when(jobExecution.getStatus()).thenReturn(Status.PENDING).getMock(); assertThrows( ActiveJobExecutionDeleteForbiddenException.class, () -> jobExecutionRepositoryDecorator.delete(jobExecution)); }
@Override public void delete(JobExecution jobExecution) { validateDeleteAllowed(jobExecution); super.delete(jobExecution); }
JobExecutionRepositoryDecorator extends AbstractRepositoryDecorator<JobExecution> { @Override public void delete(JobExecution jobExecution) { validateDeleteAllowed(jobExecution); super.delete(jobExecution); } }
JobExecutionRepositoryDecorator extends AbstractRepositoryDecorator<JobExecution> { @Override public void delete(JobExecution jobExecution) { validateDeleteAllowed(jobExecution); super.delete(jobExecution); } JobExecutionRepositoryDecorator(Repository<JobExecution> delegateRepository); }
JobExecutionRepositoryDecorator extends AbstractRepositoryDecorator<JobExecution> { @Override public void delete(JobExecution jobExecution) { validateDeleteAllowed(jobExecution); super.delete(jobExecution); } JobExecutionRepositoryDecorator(Repository<JobExecution> delegateRepository); @Override void delete(JobExecution jobExecution); @Override void deleteById(Object id); @Override void deleteAll(); @Override void delete(Stream<JobExecution> jobExecutionStream); @Override void deleteAll(Stream<Object> ids); }
JobExecutionRepositoryDecorator extends AbstractRepositoryDecorator<JobExecution> { @Override public void delete(JobExecution jobExecution) { validateDeleteAllowed(jobExecution); super.delete(jobExecution); } JobExecutionRepositoryDecorator(Repository<JobExecution> delegateRepository); @Override void delete(JobExecution jobExecution); @Override void deleteById(Object id); @Override void deleteAll(); @Override void delete(Stream<JobExecution> jobExecutionStream); @Override void deleteAll(Stream<Object> ids);  }