added unittest for cpacket