@Test
public void getJobConfigurationsByJobNameTest() {

    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);
    final Collection<JobConfiguration> jobConfigurations = new LinkedList<>();
    jobConfigurations.add(jobConfiguration);
    try {
        when(this.jobConfigurationRepository.getJobConfigurations("sampleJob", APPLICATION_NAME)).thenReturn(jobConfigurations);
    } catch (final NoSuchJobException | NoSuchJobConfigurationException e) {
        fail(e.getMessage());
    }
    final Collection<JobConfiguration> result = this.defaultAdminService.getJobConfigurationsByJobName("sampleJob");
    assertThat(result).hasSize(1);
}