@Test
public void shouldNormalizeJobTypesInConfiguredJobStatusDetailIndicators() {

    // given
    final JobsProperties jobsProperties = new JobsProperties();
    jobsProperties.getStatus().setCalculator(new HashMap<String, String>(){{
        put("soMe-TeSt job", "errorOnLastJobFailed");
    }});
    testee = new JobsConfiguration(jobsProperties, properties);
    final JobStatusCalculator defaultCalculator = mock(JobStatusCalculator.class);
    when(defaultCalculator.getKey()).thenReturn("warningOnLastJobFailed");
    final JobStatusCalculator testCalculator = mock(JobStatusCalculator.class);
    when(testCalculator.getKey()).thenReturn("errorOnLastJobFailed");
    final JobDefinitionService jobDefinitionService = mock(JobDefinitionService.class);
    when(jobDefinitionService.getJobDefinitions()).thenReturn(singletonList(
            someJobDefinition("Some Test Job"))
    );
    // when
    testee.jobStatusDetailIndicator(
            jobDefinitionService, asList(defaultCalculator, testCalculator)).statusDetails();
    // then
    verify(testCalculator).statusDetail(any(JobDefinition.class));
}