}
final DocumentBuilder b = bf.newDocumentBuilder();
final Document d = b.parse(tmpFile);
printSource(new DOMSource(d));
final XPath xp = XPathFactory.newInstance().newXPath();
xp.setNamespaceContext(new SimpleNamespaceResolver("wadl", "http://wadl.dev.java.net/2009/02"));
// check base URI
String val = (String) xp.evaluate("/wadl:application/wadl:resources/@base", d, XPathConstants.STRING);
assertEquals(val, getBaseUri().toString());
// check total number of resources is 1 (no ExtraResource details included)
val = (String) xp.evaluate("count(//wadl:resource)", d, XPathConstants.STRING);