### Question:
PendingResult { public <R> PendingResult<R> transform(@NonNull final Transformer<T, R> transformer) { FutureTask<R> transformTask = new FutureTask<>(new Callable<R>() { @Override public R call() throws Exception { return transformer.transform( future.get() ); } }); executor.execute(transformTask); return new PendingResult<>( transformTask, executor ); } PendingResult(Future<T> future,
                  Executor executor); static PendingResult<T> fromFuture(@NonNull Future<T> future); PendingResult<R> transform(@NonNull final Transformer<T, R> transformer); T await(); R adapt(@NonNull Adapter<T, R> adapter); void whenAvailable(@NonNull final Callback<T> callback); void whenDone(@NonNull final Callback<T> callback);  }### Answer:
@Test public void transform() throws Exception { given(transformer.transform(RESULT)) .willReturn(123); Integer result = testee.transform(transformer) .await(); assertEquals( Integer.valueOf(123), result ); }