@Test
public void testParseCapabilities() throws Exception {
CapabilitiesType caps = (CapabilitiesType) parser.parse(getClass().getResourceAsStream("Capabilities.xml"));
assertEquals("2.0.2", caps.getVersion());
ServiceIdentificationType si = caps.getServiceIdentification();
assertEquals("con terra GmbH Catalogue Server", si.getTitle());
assertEquals("terraCatalog 2.1 - Web based Catalogue Service \n" +
" (CS-W 2.0.0/AP ISO19115/19 0.9.3 (DE-Profil 1.0.1)) for service, datasets and applications", si.getAbstract());
KeywordsType keywords = (KeywordsType) si.getKeywords().get(0);
assertEquals("CS-W", keywords.getKeyword().get(0));
assertEquals("ISO19119", keywords.getKeyword().get(1));
assertEquals("http://www.conterra.de", keywords.getType().getCodeSpace());
assertEquals("theme", keywords.getType().getValue());
assertEquals("CSW", si.getServiceType().getValue());
// minor trouble here, this should be a list, not a string
assertEquals("2.0.2", si.getServiceTypeVersion());
ServiceProviderType sp = caps.getServiceProvider();
assertEquals("con terra GmbH", sp.getProviderName());
assertEquals("http://www.conterra.de", sp.getProviderSite().getHref());
ResponsiblePartySubsetType rp = sp.getServiceContact();