### Question:
Promise extends PromiseSupport<T> { @Override public void fulfill(T value) { super.fulfill(value); postFulfillment(); } Promise(); @Override void fulfill(T value); @Override void fulfillExceptionally(Exception exception); Promise<T> fulfillInAsync(final Callable<T> task, Executor executor); Promise<Void> thenAccept(Consumer<? super T> action); Promise<T> onError(Consumer<? super Throwable> exceptionHandler); Promise<V> thenApply(Function<? super T, V> func);  }### Answer:
@Test public void fetchingAnAlreadyFulfilledPromiseReturnsTheFulfilledValueImmediately() throws ExecutionException { var promise = new Promise<Integer>(); promise.fulfill(NumberCrunchingTask.CRUNCHED_NUMBER); promise.get(1000, TimeUnit.SECONDS); }
@Test public void fetchingAnAlreadyFulfilledPromiseReturnsTheFulfilledValueImmediately() throws InterruptedException, ExecutionException, TimeoutException { Promise<Integer> promise = new Promise<>(); promise.fulfill(NumberCrunchingTask.CRUNCHED_NUMBER); promise.get(1000, TimeUnit.SECONDS); }