Unit tests for SerializeBuffer and SwapSyncObject

Change-Id: I0602cfd8e900a7af0e03880b4ca0f3dc3f60352b
Merge pull request #3 from tribal-tec/review

Unit tests for SerializeBuffer and SwapSyncObject