Add more packets to packet order test.
Fix loop condition for emptying packet buffer.
Replace map and collect with more idiomatic form.