@Test
void testDecodeHuffmanWithArrayOffset() throws Exception {

    HpackDecoder decoder = new HpackDecoder(4096, 8192);
    String encoded = "8286418cf1e3c2e5f23a6ba0ab90f4ff84";
    byte[] bytes = TypeUtils.fromHexString(encoded);
    byte[] array = new byte[bytes.length + 1];
    System.arraycopy(bytes, 0, array, 1, bytes.length);
    ByteBuffer buffer = ByteBuffer.wrap(array, 1, bytes.length).slice();
    MetaData.Request request = (MetaData.Request) decoder.decode(buffer);
    assertEquals("GET", request.getMethod());
    assertEquals(HttpScheme.HTTP.getValue(), request.getURI().getScheme());
    assertEquals("/", request.getURI().getPath());
    assertEquals("www.example.com", request.getURI().getHost());
    assertFalse(request.iterator().hasNext());
}