public static <IN, OUT> CompletableFuture<OUT> thenComposeAsyncIfNotDone(
            CompletableFuture<IN> completableFuture,
            Executor executor,
            Function<? super IN, ? extends CompletionStage<OUT>> composeFun) {
        return completableFuture.isDone()
                ? completableFuture.thenCompose(composeFun)
                : completableFuture.thenComposeAsync(composeFun, executor);
    }
@Test
    void testComposeAsyncIfNotDone() {
        testFutureContinuation(
                (CompletableFuture<?> future, Executor executor) ->
                        FutureUtils.thenComposeAsyncIfNotDone(future, executor, o -> null));
    }