written unit-tests for XmlWriteStream