}
@Test
public void testGetHeader() {
TcpHeader h = packet.getHeader();
assertEquals(srcPort, h.getSrcPort());
assertEquals(dstPort, h.getDstPort());
assertEquals(sequenceNumber, h.getSequenceNumber());
assertEquals(acknowledgmentNumber, h.getAcknowledgmentNumber());
assertEquals(dataOffset, h.getDataOffset());
assertEquals(reserved, h.getReserved());
assertEquals(urg, h.getUrg());
assertEquals(ack, h.getAck());
assertEquals(psh, h.getPsh());
assertEquals(rst, h.getRst());
assertEquals(syn, h.getSyn());
assertEquals(fin, h.getFin());
assertEquals(window, h.getWindow());
assertEquals(checksum, h.getChecksum());
assertEquals(urgentPointer, h.getUrgentPointer());
assertEquals(options.size(), h.getOptions().size());
Iterator<TcpOption> iter = h.getOptions().iterator();
for (TcpOption o: options) {
TcpOption actual = iter.next();
assertEquals(o, actual);
}
assertArrayEquals(padding, h.getPadding());
TcpPacket.Builder b = packet.getBuilder();
TcpPacket p;
b.sequenceNumber(0);