@Test
void testGetScheduleTimeJobNotFound(@Mock HttpRequest<Buffer> request, @Mock HttpResponse<Buffer> response) {

    when(webClient.get(anyString())).thenReturn(request);
    AsyncResult<HttpResponse<Buffer>> asyncResult = mock(AsyncResult.class);
    when(asyncResult.succeeded()).thenReturn(true);
    when(asyncResult.result()).thenReturn(response);
    when(response.statusCode()).thenReturn(404);
    
    doAnswer(invocationOnMock -> {
        Handler<AsyncResult<HttpResponse<Buffer>>> handler = invocationOnMock.getArgument(0);
        executor.submit(() -> handler.handle(asyncResult));
        return null;
    }).when(request).send(any());
    
    assertThatThrownBy(() -> tested.getScheduledTime("123"))
        .hasCauseExactlyInstanceOf(JobNotFoundException.class);
    
    verify(webClient).get("/jobs/123");
}