    @Test
    public void testSerialize() {

        IPacket packet = new IPv4()
        .setDiffServ((byte) 0x20)
        .setIdentification((short) 0x1d85)
        .setFlags((byte) 0x00)
        .setTtl((byte) 50)
        .setSourceAddress("74.125.45.109")
        .setDestinationAddress("192.168.1.111")
        .setPayload(new TCP()
                        .setSourcePort(993)
                        .setDestinationPort(49202)
                        .setSequence(0xe3adee88)
                        .setAcknowledge(0xb7dad824)
                        .setDataOffset((byte) 8)
                        .setFlags((short) 0x10)
                        .setWindowSize((short) 267)
                        .setOptions(new byte[] {0x01, 0x01, 0x08, 0x0a, 0x20, (byte) 0x9a,
                                                0x41, 0x04, 0x07, 0x76, 0x53, 0x1f})
                        .setPayload(null)
                   );
        byte[] actual = packet.serialize();
        assertTrue(Arrays.equals(pktSerialized, actual));
    }