@Test
public void decodeNotEnoughData() {

    Http2Connection connection = new Http2Connection();
    ByteBuffer buffer = ByteBuffer.wrap(TestMessages.PING_NO_ENOUGH_DATA_BUFFER);
    Http2PingFrame frame = (Http2PingFrame) connection.decode(buffer);
    assertNotNull(frame);
    assertEquals(1, frame.getLength());
    assertEquals(6, frame.getType());
    assertEquals(0x00, frame.getFlags());
    assertEquals(32, frame.getStreamID());
    assertArrayEquals(new byte[] {0x00}, frame.getData());
}