Refactoring and added another simple test.

It tests packing/unpacking negotiate command with multiple
uint8 values.