### Question:
XmlResoClientWrapper { protected Document xmlStringToDocument(String content) { try { DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); return db.parse(new ByteArrayInputStream(content.getBytes("UTF-8"))); } catch (Exception e) { e.printStackTrace(); } return null; } XmlResoClientWrapper(ResoClient resoClient); Document getMetadata(); Document get(String request); Document post(String request, Map<String, String> parameters);  }### Answer:
@Test public void xmlStringToDocumentTest() { ResoClientImpl reso = buildClient(); XmlResoClientWrapper wrapper = new XmlResoClientWrapper(reso); String content = TestFileUtil.readFile("metadata.xml"); assertNotNull("Content is null", content); Document doc = wrapper.xmlStringToDocument(content); assertNotNull("Document is null", doc); Element root = doc.getDocumentElement(); assertNotNull("Root element is null", root); assertEquals("Wrong node name", "service", root.getNodeName()); }