Add unit tests for toXml()

Note: only tested in Railo 4 currently