// create a schema invalid request
String capRequest = getResourceAsString("GetCapabilities.xml");
capRequest = capRequest.replace("ows:Sections", "ows:foo");
try {
CSWXmlReader reader = new CSWXmlReader("GetCapabilities", "2.0.2",
new CSWConfiguration());
reader.read(null, new StringReader(capRequest), (Map) null);
fail("the parsing should have failed, the document is invalid");
} catch (ServiceException e) {
// it is a validation exception right?
assertTrue(e.getCause() instanceof SAXParseException);