SAXReader xmlReader = this.getSAXReader();
Document document = xmlReader.read(outputXml);
XPath xpath = DocumentHelper.createXPath("//hibernate-mapping/class/meta");
List list = xpath.selectNodes(document);
assertEquals("Expected to get one meta element", 2, list.size());
Node node = (Node) list.get(0);
assertEquals(node.getText(),"Basic");
xpath = DocumentHelper.createXPath("//hibernate-mapping/class/id/meta");
list = xpath.selectNodes(document);
assertEquals("Expected to get one meta element", 1, list.size());
node = (Node) list.get(0);
assertEquals(node.getText(),"basicId");
xpath = DocumentHelper.createXPath("//hibernate-mapping/class/property/meta");
list = xpath.selectNodes(document);
assertEquals("Expected to get one meta element", 1, list.size());
node = (Node) list.get(0);
assertEquals(node.getText(),"description");
xpath = DocumentHelper.createXPath("//hibernate-mapping/class/set/meta");
list = xpath.selectNodes(document);
assertEquals("Expected to get one meta element", 1, list.size());
node = (Node) list.get(0);
assertEquals(node.getText(),"anotherone");
}