    @Test
    public void jobExecutionsMaxNumberOfJobInstancesFailed() {

        Collection<JobExecution> jes =
                jobExecutionService.jobExecutions(empty(), Optional.of(ExitStatus.FAILED.getExitCode()), 1);
        Assertions.assertThat(jes).hasSize(2);
        Assertions.assertThat(jes).extracting(je -> je.getExitCode()).allMatch(s -> s.equals("FAILED"));
    }