Java 类com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture 实例源码

项目:guava    文件:FluentFutureTest.java   
public void testFromNonFluentFuture() throws Exception {
  ListenableFuture<String> f =
      new SimpleForwardingListenableFuture<String>(immediateFuture("a")) {};
  verify(!(f instanceof FluentFuture));
  assertThat(FluentFuture.from(f).get()).isEqualTo("a");
  // TODO(cpovirk): Test forwarding more extensively.
}
项目:guava    文件:FluentFutureTest.java   
public void testFromNonFluentFuture() throws Exception {
  ListenableFuture<String> f =
      new SimpleForwardingListenableFuture<String>(immediateFuture("a")) {};
  verify(!(f instanceof FluentFuture));
  assertThat(FluentFuture.from(f).get()).isEqualTo("a");
  // TODO(cpovirk): Test forwarding more extensively.
}