assertEquals(0, packet.position());
assertEquals(100, packet.limit());
}
public void testDuplicate() {
Packet packet = createTestPacket(100);
packet.position(5);
packet.limit(95);
Packet packet2 = packet.duplicate();
packet2.position(10);
packet2.limit(20);
assertEquals(5, packet.position());
assertEquals(95, packet.limit());
assertEquals(10, packet2.position());
assertEquals(20, packet2.limit());
}