Added tests for custom lossy and lossless packets.

Fixed bug with lossless packets.