Document document = xmlReader.read(outputXml);
Element root = document.getRootElement();
// There are 7 attributes because there are defaults defined by the DTD makes up the missing entries
assertEquals("Unexpected number of hibernate-mapping elements ", 7, root.attributeCount() );
assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml", root.attribute("package").getStringValue() );
assertEquals("Unexpected schema name", "myschema", root.attribute("schema").getStringValue() );
assertEquals("Unexpected mycatalog name", "mycatalog", root.attribute("catalog").getStringValue() );
}