Add test for sorted buffer insertion.
Replace packet in buffer in case of duplicate.
Add test for duplicate packet handling.
Discard duplicate incoming packets.