@Test
public void encodeShouldSucceed() throws Http2Exception {

    Http2Headers headers = headers();
    ByteBuf buf = Unpooled.buffer();
    try {
        encoder.encodeHeaders(3 /* randomly chosen */, headers, buf);
        assertTrue(buf.writerIndex() > 0);
    } finally {
        buf.release();
    }
}