@Test void testDeleteByIdAllowed() { Object jobExecutionId = "myJobExecutionId"; JobExecution jobExecution = mock(JobExecution.class); when(jobExecution.getStatus()).thenReturn(Status.FAILED).getMock(); when(delegateRepository.findOneById(jobExecutionId)).thenReturn(jobExecution); jobExecutionRepositoryDecorator.deleteById(jobExecutionId); verify(delegateRepository).deleteById(jobExecutionId); }
@Override public void deleteById(Object id) { validateDeleteAllowedById(id); super.deleteById(id); }
JobExecutionRepositoryDecorator extends AbstractRepositoryDecorator<JobExecution> { @Override public void deleteById(Object id) { validateDeleteAllowedById(id); super.deleteById(id); } }
JobExecutionRepositoryDecorator extends AbstractRepositoryDecorator<JobExecution> { @Override public void deleteById(Object id) { validateDeleteAllowedById(id); super.deleteById(id); } JobExecutionRepositoryDecorator(Repository<JobExecution> delegateRepository); }
JobExecutionRepositoryDecorator extends AbstractRepositoryDecorator<JobExecution> { @Override public void deleteById(Object id) { validateDeleteAllowedById(id); super.deleteById(id); } 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 deleteById(Object id) { validateDeleteAllowedById(id); super.deleteById(id); } 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);  }