@Test
public void testDeserialize() throws PacketParsingException {

    byte[] spudPacket =  {
            (byte) 0xd8, 0x00, 0x00, (byte) 0xd8, (byte) 0xb6,
            0x40, 0x17, (byte) 0x88, 0x0a, 0x51, 0x01, 0x07,
            0x00, (byte) 0xa1, 0x00, (byte) 0xa2, 0x68, 0x75,
            0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x65,
            0x4a, 0x61, 0x63, 0x6f, 0x62, 0x67, 0x6d, 0x65,
            0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61,
            0x73, 0x20, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64,
            0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6f,
            0x6d
    };
    SPUD packet = new SPUD();
    packet.deserialize(spudPacket, 0, spudPacket.length);
    byte[] packetSerialized = packet.serialize();
    assertTrue(Arrays.equals(spudPacket, packetSerialized));
}