@Test
void testScheduleProcessInstanceJob(@Mock HttpRequest<Buffer> request) {

    when(webClient.post(anyString())).thenReturn(request);
    ProcessInstanceJobDescription processInstanceJobDescription = ProcessInstanceJobDescription.of(123,
                                                                                                   ExactExpirationTime.now(),
                                                                                                   "processInstanceId",
                                                                                                   "processId");
    tested.scheduleProcessInstanceJob(processInstanceJobDescription);
    verify(webClient).post("/jobs");
    ArgumentCaptor<Job> jobArgumentCaptor = forClass(Job.class);
    verify(request).sendJson(jobArgumentCaptor.capture(), any(Handler.class));
    Job job = jobArgumentCaptor.getValue();
    assertThat(job.getId()).isEqualTo(processInstanceJobDescription.id());
    assertThat(job.getExpirationTime()).isEqualTo(processInstanceJobDescription.expirationTime().get());
    assertThat(job.getProcessInstanceId()).isEqualTo(processInstanceJobDescription.processInstanceId());
    assertThat(job.getProcessId()).isEqualTo(processInstanceJobDescription.processId());
}