@Override
    public CompletableFuture<JobManagerRunnerResult> getResultFuture() {
        return resultFuture;
    }
@Test
    void testInitializationFailureSetsExceptionHistoryProperly()
            throws ExecutionException, InterruptedException {
        final CompletableFuture<JobMasterService> jobMasterServiceFuture =
                new CompletableFuture<>();
        DefaultJobMasterServiceProcess serviceProcess = createTestInstance(jobMasterServiceFuture);
        final RuntimeException originalCause = new RuntimeException("Expected RuntimeException");

        long beforeFailureTimestamp = System.currentTimeMillis();
        jobMasterServiceFuture.completeExceptionally(originalCause);
        long afterFailureTimestamp = System.currentTimeMillis();

        final RootExceptionHistoryEntry entry =
                Iterables.getOnlyElement(
                        serviceProcess
                                .getResultFuture()
                                .get()
                                .getExecutionGraphInfo()
                                .getExceptionHistory());

        assertInitializationException(
                entry.getException(),
                originalCause,
                entry.getTimestamp(),
                beforeFailureTimestamp,
                afterFailureTimestamp);
        assertThat(entry.isGlobal()).isTrue();
    }