public static <T> CompletableFuture<T> supplyAsync(
            SupplierWithException<T, ?> supplier, Executor executor) {
        return CompletableFuture.supplyAsync(
                () -> {
                    try {
                        return supplier.get();
                    } catch (Throwable e) {
                        throw new CompletionException(e);
                    }
                },
                executor);
    }
@Test
    void testSupplyAsync() {
        final Object expectedResult = new Object();
        final CompletableFuture<Object> future =
                FutureUtils.supplyAsync(() -> expectedResult, EXECUTOR_RESOURCE.getExecutor());

        assertThatFuture(future).eventuallySucceeds().isEqualTo(expectedResult);
    }