@Test
public void testInvalidSpdySynReplyFrameLength() throws Exception {

    short type = 2;
    byte flags = 0;
    int length = 0; // invalid length
    ByteBuf buf = Unpooled.buffer(SPDY_HEADER_SIZE + length);
    encodeControlFrameHeader(buf, type, flags, length);
    decoder.decode(buf);
    verify(delegate).readFrameError(anyString());
    assertFalse(buf.isReadable());
    buf.release();
}