assertEquals("http://www.geoserver.org/inspire/one", ns.getFirstChild().getNodeValue());
}
@Test
public void testChangeMediaType() throws Exception {
WFSInfo wfs = getGeoServer().getService(WFSInfo.class);
wfs.getMetadata().put(InspireMetadata.LANGUAGE.key, "fre");
wfs.getMetadata().put(InspireMetadata.SERVICE_METADATA_URL.key, "http://foo.com?bar=baz");
getGeoServer().save(wfs);
Document dom = getAsDOM("wfs?request=getcapabilities&service=wfs&version=1.1.0");
// print(dom);
assertEquals(DLS_NAMESPACE, dom.getDocumentElement().getAttribute("xmlns:inspire_dls"));
assertMetadataUrlAndMediaType(dom, "http://foo.com?bar=baz", "application/vnd.ogc.csw.GetRecordByIdResponse_xml");
wfs.getMetadata().put(InspireMetadata.SERVICE_METADATA_TYPE.key, "application/xml");
getGeoServer().save(wfs);
dom = getAsDOM("wfs?request=getcapabilities&service=wfs&version=1.1.0");
assertEquals(DLS_NAMESPACE, dom.getDocumentElement().getAttribute("xmlns:inspire_dls"));
assertMetadataUrlAndMediaType(dom, "http://foo.com?bar=baz", "application/xml");