assertEquals("fre", respLangVal.getFirstChild().getNodeValue());
}
@Test
public void testChangeMediaType() throws Exception {
WMSInfo wms = getGeoServer().getService(WMSInfo.class);
wms.getSRS().add("EPSG:4326");
wms.getMetadata().put(InspireMetadata.LANGUAGE.key, "fre");
wms.getMetadata().put(InspireMetadata.SERVICE_METADATA_URL.key, "http://foo.com?bar=baz");
getGeoServer().save(wms);
Document dom = getAsDOM("wms?request=getcapabilities");
assertEquals(NAMESPACE, dom.getDocumentElement().getAttribute("xmlns:inspire_vs"));
assertMetadataUrlAndMediaType(dom, "http://foo.com?bar=baz", "application/vnd.iso.19139+xml");
wms.getMetadata().put(InspireMetadata.SERVICE_METADATA_TYPE.key, "application/xml");
getGeoServer().save(wms);
dom = getAsDOM("wms?request=getcapabilities");
assertEquals(NAMESPACE, dom.getDocumentElement().getAttribute("xmlns:inspire_vs"));
assertMetadataUrlAndMediaType(dom, "http://foo.com?bar=baz", "application/xml");