@Test
@Timeout(value = 1, unit = TimeUnit.SECONDS)
public void testCronReboot() throws Exception {

    long now = System.currentTimeMillis();
    Semaphore s = new Semaphore(0);
    ScheduledCompletableFuture<Void> future = cronScheduler.schedule(() -> {
    }, "@reboot");
    future.getPromise().thenAccept(x -> s.release());
    s.acquire(1);
    long diff = System.currentTimeMillis() - now;
    assertTrue(diff < 200, "Time difference should be less 200 but was: " + diff);
    assertTrue(future.isDone(), "Scheduler should be done once reboot call done.");
}