Added unit tests for packet class.

Checks correctness of accessor and mutator methods.