@Test
void doCheckReferenceJobShouldBeNOkWithInvalidValue() {

    String referenceJob = "referenceJob";
    JenkinsFacade jenkins = mock(JenkinsFacade.class);
    when(jenkins.getJob(referenceJob)).thenReturn(Optional.empty());
    ModelValidation model = new ModelValidation(jenkins);
    assertThat(model.validateJob(referenceJob))
            .isError()
            .hasMessage("There is no such job - maybe the job has been renamed?");
}