### Question:
Promises { public static Promise<Void> newSuccess() { return newSuccess(null); } private  Promises(); static Promise<Void> newSuccess(); static Promise<T> newSuccess(final T value); static Promise<T> newFailure(final Throwable cause); static Promise<Void> newPromise(final Runnable runnable); static Promise<V> newPromise(final Callable<V> callable); static T await(final Promise<T> promise); static T await(final Promise<T> promise, final long timeout, final TimeUnit timeUnit); static Future<T> toFuture(final Promise<T> promise);  }### Answer:
@Test public void newSuccessTest() { final Promise<Integer> promise = Promises.newSuccess(1); assertNotNull(promise); assertTrue(promise.isComplete()); }
@Test public void thenWithNewSuccessTest() { @SuppressWarnings("unchecked") final Completable<Integer> completable = createStrictMock(Completable.class); completable.setSuccess(1); replay(completable); final Promise<Integer> promise = Promises.newSuccess(1); promise.then(completable); verify(completable); }