}
@Test
public void testParseArrayOfObjects() throws Exception {
String xml = convertToXml("{\"equipments\":[{\"type\":\"charger\",\"cost\":\"1$\"},{\"type\":\"battery\",\"cost\":\"2$\"}]}", new JsonXmlReader());
Diff diff = XMLUnit.compareXML("" +
" <equipments>\n" +
" <equipments>\n" +
" <type>charger</type>\n" +
" <cost>1$</cost>\n" +
" </equipments>\n" +
" <equipments>\n" +
" <type>battery</type>\n" +
" <cost>2$</cost>\n" +
" </equipments>\n" +
" </equipments>", xml);
assertTrue(diff.toString(), diff.similar());
}