testing serialization with content encoding