@Override
    protected CompletableFuture<JobStatusInfo> handleRequest(
            @Nonnull HandlerRequest<EmptyRequestBody> request, @Nonnull RestfulGateway gateway)
            throws RestHandlerException {
        JobID jobId = request.getPathParameter(JobIDPathParameter.class);
        return gateway.requestJobStatus(jobId, timeout).thenApply(JobStatusInfo::new);
    }
@Test
    void testRequestJobStatus() throws Exception {
        final JobStatusHandler jobStatusHandler =
                new JobStatusHandler(
                        CompletableFuture::new,
                        TestingUtils.TIMEOUT,
                        Collections.emptyMap(),
                        JobStatusInfoHeaders.getInstance());

        final HandlerRequest<EmptyRequestBody> request = createRequest(new JobID());
        final CompletableFuture<JobStatusInfo> response =
                jobStatusHandler.handleRequest(
                        request,
                        new TestingRestfulGateway.Builder()
                                .setRequestJobStatusFunction(
                                        ignored ->
                                                CompletableFuture.completedFuture(
                                                        JobStatus.INITIALIZING))
                                .build());

        assertThat(JobStatus.INITIALIZING).isEqualTo(response.get().getJobStatus());
    }