@Test(expected = SpringBatchLightminApplicationException.class)
public void deleteJobConfigurationErrorTest() {

    final Long jobConfigurationId = 1L;
    when(this.properties.getApplicationName()).thenReturn(APPLICATION_NAME);
    final JobSchedulerConfiguration jobSchedulerConfiguration = DomainTestHelper.createJobSchedulerConfiguration(
            "0 0/5 * * * ?", null, null, JobSchedulerType.CRON);
    final JobConfiguration jobConfiguration = DomainTestHelper.createJobConfiguration(jobSchedulerConfiguration);
    jobConfiguration.setJobConfigurationId(jobConfigurationId);
    try {
        when(this.jobConfigurationRepository.getJobConfiguration(jobConfigurationId, APPLICATION_NAME)).thenReturn(jobConfiguration);
        doThrow(NoSuchJobConfigurationException.class).when(this.jobConfigurationRepository).delete(jobConfiguration, APPLICATION_NAME);
    } catch (final NoSuchJobConfigurationException e) {
        fail(e.getMessage());
    }
    this.defaultAdminService.deleteJobConfiguration(jobConfigurationId);
}