public void testLayerQualified() throws Exception {
Document dom = dom(get("cite/Forests/wms?request=getCapabilities&version=1.3.0"), true);
Element e = dom.getDocumentElement();
assertEquals("WMS_Capabilities", e.getLocalName());
XpathEngine xpath = XMLUnit.newXpathEngine();
assertTrue(xpath
.getMatchingNodes("//wms:Layer/wms:Name[starts-with(., cite:Forests)]", dom)
.getLength() == 1);
assertEquals(1, xpath.getMatchingNodes("//wms:Layer/wms:Layer", dom).getLength());
NodeList nodes = xpath.getMatchingNodes("//wms:Layer//wms:OnlineResource", dom);
assertTrue(nodes.getLength() > 0);
for (int i = 0; i < nodes.getLength(); i++) {
e = (Element) nodes.item(i);
String attribute = e.getAttribute("xlink:href");
assertTrue(attribute.contains("geoserver/cite/Forests/ows"));