I’m trying to create tests to make sure our API returns expected xml structure.
For that I’m using xml2Json(responseBody) which works great but I have trouble when I try to assert the existence of am empty element.
My xml could look like this
<root>
<name>Henrik</name>
<address />
</root>
jsonObject.root.name works but jsonObject.root.address makes my test fail.
How to I make tests for empty elements?