Parser parser = new Parser(new CSWConfiguration());
@Test
public void testParseCapabilitiesRequest() throws Exception {
String capRequestPath = "GetCapabilities.xml";
GetCapabilitiesType caps = (GetCapabilitiesType) parser.parse(getClass().getResourceAsStream(capRequestPath));
assertEquals("CSW", caps.getService());
List versions = caps.getAcceptVersions().getVersion();
assertEquals("2.0.2", versions.get(0));
assertEquals("2.0.0", versions.get(1));
assertEquals("0.7.2", versions.get(2));
List sections = caps.getSections().getSection();
assertEquals("OperationsMetadata", sections.get(0));
}