Add unittests for packet buffer