@Test
public void shouldIndicateOkIfNoJobDefinitionsAvailable() {

    // given
    final JobStatusCalculator defaultCalculator = mock(JobStatusCalculator.class);
    when(defaultCalculator.getKey()).thenReturn("warningOnLastJobFailed");
    final JobDefinitionService noJobDefinitions = mock(JobDefinitionService.class);
    when(noJobDefinitions.getJobDefinitions()).thenReturn(emptyList());
    // when
    final StatusDetail statusDetail = testee.jobStatusDetailIndicator(
            noJobDefinitions,
            singletonList(defaultCalculator)).statusDetails()
            .get(0);
    // then
    assertThat(statusDetail.getStatus(), is(OK));
    assertThat(statusDetail.getName(), is("Jobs"));
    assertThat(statusDetail.getMessage(), is("No job definitions configured in application."));
}