@Test
public void testUnknownSpdyGoAwayFrameFlags() throws Exception {

    short type = 7;
    byte flags = (byte) 0xFF; // undefined flags
    int length = 8;
    int lastGoodStreamId = RANDOM.nextInt() & 0x7FFFFFFF;
    int statusCode = RANDOM.nextInt() | 0x01;
    ByteBuf buf = Unpooled.buffer(SPDY_HEADER_SIZE + length);
    encodeControlFrameHeader(buf, type, flags, length);
    buf.writeInt(lastGoodStreamId);
    buf.writeInt(statusCode);
    decoder.decode(buf);
    verify(delegate).readGoAwayFrame(lastGoodStreamId, statusCode);
    assertFalse(buf.isReadable());
    buf.release();
}