@Test public void emptyFramerShouldSendNoPayload() { ListMultimap<CharSequence, CharSequence> expectedHeaders = ImmutableListMultimap.copyOf(new DefaultHttp2Headers() .status(new AsciiString("200")) .set(new AsciiString("content-type"), new AsciiString("application/grpc")) .set(new AsciiString("grpc-status"), new AsciiString("0"))); ArgumentCaptor<SendResponseHeadersCommand> cmdCap = ArgumentCaptor.forClass(SendResponseHeadersCommand.class); stream().close(Status.OK, new Metadata()); verify(writeQueue).enqueue(cmdCap.capture(), eq(true)); SendResponseHeadersCommand cmd = cmdCap.getValue(); assertThat(cmd.stream()).isSameAs(stream.transportState()); assertThat(ImmutableListMultimap.copyOf(cmd.headers())) .containsExactlyEntriesIn(expectedHeaders); assertThat(cmd.endOfStream()).isTrue(); }
@Override protected TransportState transportState() { return state; }
NettyServerStream extends AbstractServerStream { @Override protected TransportState transportState() { return state; } }
NettyServerStream extends AbstractServerStream { @Override protected TransportState transportState() { return state; } NettyServerStream(
      Channel channel,
      TransportState state,
      Attributes transportAttrs,
      String authority,
      StatsTraceContext statsTraceCtx,
      TransportTracer transportTracer); }
NettyServerStream extends AbstractServerStream { @Override protected TransportState transportState() { return state; } NettyServerStream(
      Channel channel,
      TransportState state,
      Attributes transportAttrs,
      String authority,
      StatsTraceContext statsTraceCtx,
      TransportTracer transportTracer); @Override Attributes getAttributes(); @Override String getAuthority(); }
NettyServerStream extends AbstractServerStream { @Override protected TransportState transportState() { return state; } NettyServerStream(
      Channel channel,
      TransportState state,
      Attributes transportAttrs,
      String authority,
      StatsTraceContext statsTraceCtx,
      TransportTracer transportTracer); @Override Attributes getAttributes(); @Override String getAuthority();  }