NettyClientStream extends Http2ClientStream { void transportDataReceived(ByteBuf frame, boolean endOfStream) { transportDataReceived(new NettyReadableBuffer(frame.retain()), endOfStream); } NettyClientStream(MethodDescriptor<?, ?> method, Metadata headers, Channel channel,
      NettyClientHandler handler, int maxMessageSize, AsciiString authority, AsciiString scheme); @Override void setAuthority(String authority); @Override void start(ClientStreamListener listener); @Override void request(int numMessages); @Override Integer id(); void id(int id); void setHttp2Stream(Http2Stream http2Stream); @Nullable Http2Stream http2Stream();  }
@Test public void nonGrpcResponseShouldSetStatus() throws Exception { stream().transportDataReceived(Unpooled.copiedBuffer(MESSAGE, UTF_8), true); ArgumentCaptor<Status> captor = ArgumentCaptor.forClass(Status.class); verify(listener).closed(captor.capture(), any(Metadata.class)); assertEquals(Status.Code.INTERNAL, captor.getValue().getCode()); }