protocol serializer with test