@Test
public void testConstructionInvalidOrd() throws Exception, PacketParserException {

    PacketParser parser = new HandshakeBeginPacket().getParser();
    HandshakeBeginPacket.Flags flags = new HandshakeBeginPacket.Flags();
    flags.setRegistered(true);
    flags.setHandshakeRequest(true);
    flags.setRequestsReturnService(true);
    byte[] buffer = new byte[] {
            (byte) (PACKETS.HANDSHAKE_OPEN.ordinal() + 16), 0,2,4,8,16,32,64,2,4,8,16,32,64,2,4,8,16,32,64,2,4,8,16,32,64,2,4,8,16,32,64,0, flags.toByte()
    };
    expect.expectMessage("Malformed Handshake Packet has incorrect packet type/version.");
    parser.parse(new PacketBuffer().write(buffer));
}