add tests for binary serializer