unit test for packet