@Test
@Timeout(value = 300, unit = TimeUnit.MILLISECONDS)
public void testBeforeResolved() throws InterruptedException, ExecutionException {

    CompletableFuture<Boolean> d = new CompletableFuture<>();
    ScheduledCompletableFuture<Boolean> before = scheduler.before(d, Duration.ofMillis(100));
    d.complete(Boolean.TRUE);
    assertTrue(before.isDone(), "Scheduled job should finish done");
    assertTrue(before.get(), "Before CompletableFuture should return correct value");
}