.paddingAtBuild(true);
EthernetPacket orgPacket = eb.build();
PcapHandle handle = Pcaps.openDead(DataLinkType.EN10MB, 65536);
PcapDumper dumper = handle.dumpOpen(dumpFile);
dumper.dump(orgPacket, 0, 0);
List<IpV4Packet> list = new ArrayList<IpV4Packet>();
for (IpV4Packet p: IpV4Helper.fragment((IpV4Packet)orgPacket.getPayload(), 987)) {
EthernetPacket ep = eb.payloadBuilder(new SimpleBuilder(p)).build();
dumper.dump(ep, 0, 0);
list.add(p);
}
dumper.close();
handle.close();
Collections.shuffle(list);
assertEquals(
orgPacket,