Maybe extends FutureTask<T> { public static <T> Maybe<T> value(T value) { var maybe = new Maybe(CALLABLE); maybe.set(value); return maybe; } 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 value() { assertEquals("expected", maybe.value()); }
@Test void value_throws_exception() { assertNull(exceptional.value()); }
@Test void value_timeout() { assertEquals("expected", maybe.value(1, TimeUnit.MINUTES)); }
@Test void value_timeout_throws_exception() { assertNull(exceptional.value(0, TimeUnit.MINUTES)); }
@Test void value_constructor() { var maybe = Maybe.value("a"); assertEquals("a", maybe.value()); }