  @Test
  public void readHeaderFrame() throws Http2Exception {

    final int streamId = 1;

    final ByteBuf input = Unpooled.buffer();
    try {
      final Http2Headers headers =
          new DefaultHttp2Headers().authority("foo").method("get").path("/").scheme("https");
      final Http2Flags flags = new Http2Flags().endOfHeaders(true).endOfStream(true);
      writeHeaderFrame(input, streamId, headers, flags);
      frameReader.readFrame(ctx, input, listener);

      verify(listener).onHeadersRead(ctx, 1, headers, 0, true);
    } finally {
      input.release();
    }
  }