@Test public void newStreamStart() { Status error = Status.UNAVAILABLE; RpcProgress rpcProgress = RpcProgress.DROPPED; FailingClientTransport transport = new FailingClientTransport(error, rpcProgress); ClientStream stream = transport .newStream(TestMethodDescriptors.voidMethod(), new Metadata(), CallOptions.DEFAULT); ClientStreamListener listener = mock(ClientStreamListener.class); stream.start(listener); verify(listener).closed(eq(error), eq(rpcProgress), any(Metadata.class)); }
@Override public ClientStream newStream( MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) { return new FailingClientStream(error, rpcProgress); }
FailingClientTransport implements ClientTransport { @Override public ClientStream newStream( MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) { return new FailingClientStream(error, rpcProgress); } }
FailingClientTransport implements ClientTransport { @Override public ClientStream newStream( MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) { return new FailingClientStream(error, rpcProgress); } FailingClientTransport(Status error, RpcProgress rpcProgress); }
FailingClientTransport implements ClientTransport { @Override public ClientStream newStream( MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) { return new FailingClientStream(error, rpcProgress); } FailingClientTransport(Status error, RpcProgress rpcProgress); @Override ClientStream newStream(
      MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions); @Override void ping(final PingCallback callback, Executor executor); @Override ListenableFuture<SocketStats> getStats(); @Override InternalLogId getLogId(); }
FailingClientTransport implements ClientTransport { @Override public ClientStream newStream( MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) { return new FailingClientStream(error, rpcProgress); } FailingClientTransport(Status error, RpcProgress rpcProgress); @Override ClientStream newStream(
      MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions); @Override void ping(final PingCallback callback, Executor executor); @Override ListenableFuture<SocketStats> getStats(); @Override InternalLogId getLogId();  }