public static RootExceptionHistoryEntry fromGlobalFailure(
            Throwable cause,
            long timestamp,
            CompletableFuture<Map<String, String>> failureLabels,
            Iterable<Execution> executions) {
        return createRootExceptionHistoryEntry(
                cause, timestamp, failureLabels, null, null, executions);
    }
@Test
    void testFromGlobalFailure() throws ExecutionException, InterruptedException {
        final Throwable concurrentException0 =
                new RuntimeException("Expected concurrent failure #0");
        final ExecutionVertex concurrentlyFailedExecutionVertex0 = extractExecutionVertex(0);
        final Predicate<ExceptionHistoryEntry> exception0Predicate =
                triggerFailureAndCreateEntryMatcher(
                        concurrentException0, concurrentlyFailedExecutionVertex0);

        final Throwable concurrentException1 =
                new IllegalStateException("Expected concurrent failure #1");
        final ExecutionVertex concurrentlyFailedExecutionVertex1 = extractExecutionVertex(1);
        final Predicate<ExceptionHistoryEntry> exception1Predicate =
                triggerFailureAndCreateEntryMatcher(
                        concurrentException1, concurrentlyFailedExecutionVertex1);

        final Throwable rootCause = new Exception("Expected root failure");
        final long rootTimestamp = System.currentTimeMillis();
        final CompletableFuture<Map<String, String>> rootFailureLabels =
                CompletableFuture.completedFuture(Collections.singletonMap("key", "value"));
        final RootExceptionHistoryEntry actualEntry =
                RootExceptionHistoryEntry.fromGlobalFailure(
                        rootCause,
                        rootTimestamp,
                        rootFailureLabels,
                        StreamSupport.stream(
                                        executionGraph.getAllExecutionVertices().spliterator(),
                                        false)
                                .map(ExecutionVertex::getCurrentExecutionAttempt)
                                .collect(Collectors.toSet()));

        assertThat(actualEntry)
                .matches(
                        ExceptionHistoryEntryMatcher.matchesGlobalFailure(
                                rootCause, rootTimestamp, rootFailureLabels.get()));

        assertThat(actualEntry.getConcurrentExceptions())
                .allMatch(
                        exceptionHistoryEntry ->
                                exception0Predicate.test(exceptionHistoryEntry)
                                        || exception1Predicate.test(exceptionHistoryEntry));
    }