Add tests for XML/JSON conversions