Document document = xmlReader.read(outputXml);
// Validate the Generator and that it does have arguments
XPath xpath = DocumentHelper.createXPath("//hibernate-mapping/query");
List list = xpath.selectNodes(document);
assertEquals("Expected to get correct number of query elements", 2, list.size() );
Attribute genAtt = ( (Element)list.get(0) ).attribute("name");
assertEquals("Unexpected query name", "test_query_1", genAtt.getStringValue() );
genAtt = ( (Element)list.get(0) ).attribute("flush-mode");