### Question:
XmlUtils { public static XmlNode parseXml(final InputStream content) { try { final JAXBContext context = JAXBContext.newInstance(XmlNode.class); final Unmarshaller unmarshaller = context.createUnmarshaller(); return (XmlNode) unmarshaller.unmarshal(content); } catch (JAXBException e) { if (log.isDebugEnabled()) { log.error("Error parsing XmlNode document", e.getMessage()); } } return null; } private  XmlUtils(); static List<XmlNode> findTemplateDocuments(final Path path, final PluginContext context); static String xmlNodeToString(final XmlNode value); static XmlNode parseXml(final InputStream content); static XmlNode parseXml(final Path path);  }### Answer:
@Test public void testParsingProperties() throws Exception { final InputStream resourceAsStream = getClass().getResourceAsStream("/test_document_type.xml"); final XmlNode documentNode = XmlUtils.parseXml(resourceAsStream); assertNotNull(documentNode); final Collection<XmlNode> templates = documentNode.getTemplates(); assertEquals(4, templates.size()); }
@Test public void testParseXml() throws Exception { final List<XmlNode> templateDocuments = XmlUtils.findTemplateDocuments(getProjectRoot(), getContext()); final XmlNode xmlNode = findPluginNode(templateDocuments); final String xml = XmlUtils.xmlNodeToString(xmlNode); assertNotNull(xml); final XmlNode myXml = XmlUtils.parseXml(IOUtils.toInputStream(xml)); assertNotNull(myXml); }