@Test
public void decodeShouldSucceed() throws Exception {

    ByteBuf buf = encode(b(":method"), b("GET"), b("akey"), b("avalue"), randomBytes(), randomBytes());
    try {
        Http2Headers headers = decoder.decodeHeaders(0, buf);
        assertEquals(3, headers.size());
        assertEquals("GET", headers.method().toString());
        assertEquals("avalue", headers.get(new AsciiString("akey")).toString());
    } finally {
        buf.release();
    }
}