public static CompletableFuture<Void> runAfterwards(
            CompletableFuture<?> future, RunnableWithException runnable) {
        return runAfterwardsAsync(future, runnable, Executors.directExecutor());
    }
@Test
    void testRunAfterwards() {
        final CompletableFuture<Void> inputFuture = new CompletableFuture<>();
        final OneShotLatch runnableLatch = new OneShotLatch();

        final CompletableFuture<Void> runFuture =
                FutureUtils.runAfterwards(inputFuture, runnableLatch::trigger);

        assertThat(runnableLatch.isTriggered()).isFalse();
        assertThat(runFuture).isNotDone();

        inputFuture.complete(null);

        assertThat(runnableLatch.isTriggered()).isTrue();
        assertThatFuture(runFuture).eventuallySucceeds();
    }