Promise { @Nullable public abstract R get() throws InterruptedException;  abstract void thenNothing(); @NonNull abstract ActionHandle then(@NonNull ResultListener<R> listener); @NonNull abstract ActionHandle then(@NonNull ActorThread thread, @NonNull ResultListener<R> listener); @Nullable abstract R get(); @NonNull static Promise<R> wrap(@Nullable R result); @NonNull static Promise<R> wrap(@Nullable R result, @Nullable ResourceCleaner<R> cleaner); @NonNull static TestPromise<R> test(@Nullable R result); @NonNull static Promise<R> wrap(@NonNull MessageSender sender, @NonNull T message);  }
@Test public void verifyGet_true_callGet() throws Exception { TestPromise<Object> promise = new TestPromise<>(mResult); promise.get(); Assert.assertTrue(promise.verifyGet()); }
@Test public void get_resultIsTheSame_callGet() throws Exception { TestPromise<Object> promise = new TestPromise<>(mResult); Assert.assertSame(mResult, promise.get()); }
@Test public void verifyGet_doesNotIntersect_callGet() throws Exception { TestPromise<Object> promise = new TestPromise<>(mResult); promise.get(); Assert.assertFalse(promise.verifyThen()); Assert.assertFalse(promise.verifyThenWithThread()); Assert.assertFalse(promise.verifyThenNothing()); Assert.assertFalse(promise.verifyForget()); }