@Test
void standard() {

    final ShutdownEnabler se = new ShutdownEnabler();
    final ExecutorService e = Executors.newFixedThreadPool(1);
    final Future<?> f = e.submit(se::waitUntilTriggered);
    assertThatThrownBy(() -> f.get(1, TimeUnit.SECONDS))
        .isInstanceOf(TimeoutException.class); // the thread is blocked
    final Consumer<ReturnCode> c = se.get()
        .orElseThrow(() -> new IllegalStateException("Should have returned."));
    c.accept(ReturnCode.OK); // this unblocks the thread
    // this should return
    assertTimeout(Duration.ofSeconds(5), (Executable) f::get);
    assertThat(f).isDone();
    e.shutdownNow();
}