Maybe extends FutureTask<T> { @Blocking public Optional<T> some() { try { return Optional.ofNullable(get()); } catch (ExecutionException | InterruptedException ignored) { return Optional.empty(); } } Maybe(Callable<T> callable);  Maybe(Runnable runnable, T result); static Maybe<T> value(T value); @Blocking Optional<T> some(); @Blocking Optional<T> some(long timeout, TimeUnit unit); @Blocking @Nullable T value(); @Blocking @Nullable T value(long timeout, TimeUnit unit);  }
@Test void some_timeout() { assertEquals("expected", maybe.some(1, TimeUnit.MINUTES).orElseThrow()); }
@Test void some_timeout_throws_exception() { assertEquals(Optional.empty(), exceptional.some(0, TimeUnit.MINUTES)); }
@Test void some() { assertEquals("expected", maybe.some().orElseThrow()); }
@Test void some_throws_exception() { assertEquals(Optional.empty(), exceptional.some()); }