added tests for JSON and XML serialization