@Test
public void testValidateJobExists() throws Exception {

    when(jobOperations.getJob(JOB_ID)).thenReturn(Optional.empty());
    Throwable thrown = catchThrowable(() -> loadBalancerValidator.validateJobId(JOB_ID));
    assertThat(thrown).isInstanceOf(JobManagerException.class);
    assertThat(((JobManagerException) thrown).getErrorCode()).isEqualTo(JobManagerException.ErrorCode.JobNotFound);
}