SAXReader xmlReader = getSAXReader();
Document document = xmlReader.read(outputXml);
XPath xpath = DocumentHelper.createXPath("//hibernate-mapping/class/set");
List list = xpath.selectNodes(document);
assertEquals("Expected to get one set element", 1, list.size());
Element node = (Element) list.get(0);
assertEquals(node.attribute( "name" ).getText(),"searchResults");
assertEquals(node.attribute( "access" ).getText(),"field");
xpath = DocumentHelper.createXPath("//hibernate-mapping/class/set/element");
list = xpath.selectNodes(document);
assertEquals("Expected to get one element 'element'", 1, list.size());
node = (Element) list.get(0);
assertEquals(node.attribute( "type" ).getText(), "string");
list = node.selectNodes("column");
assertEquals("Expected to get one element 'column'", 1, list.size());