private static <T> CompletableFuture<Void> allOfFailfast(CompletableFuture<?>[] futures) {
        CompletableFuture<Void> result = CompletableFuture.allOf(futures);
        for (CompletableFuture<?> future : futures) {
            future.whenComplete((t, ex) -> {
                if (ex != null) {
                    result.completeExceptionally(ex);
                }
            });
        }

        return result;
    }
@param started an intermediate storage for already started {@link Startable}s to prevent multiple starts.
@param startables a {@link Stream} of {@link Startable}s to start and scan for transitive dependencies.
core/src/main/java/org/testcontainers/lifecycle/Startables.java