Unit tests for SerializeBuffer and SwapSyncObject