WMSCapabilitiesAdapter extends XMLAdapter implements OWSCapabilitiesAdapter { public LayerMetadata getLayer( String name ) { return getLayer( name, layerTree ); }  LinkedList<String> getFormats( WMSRequestType request ); String getAddress( WMSRequestType request, boolean get ); Envelope getBoundingBox( String srs, String layer ); List<String> getNamedLayers(); boolean hasLayer( String name ); LinkedList<String> getCoordinateSystems( String layer ); LayerMetadata getLayer( String name ); Envelope getLatLonBoundingBox( String layer ); Envelope getLatLonBoundingBox( List<String> layers ); Tree<LayerMetadata> getLayerTree(); boolean isOperationSupported( WMSRequestType request ); @Override List<String> parseLanguages(); @Override ServiceProvider parseServiceProvider(); @Override ServiceIdentification parseServiceIdentification(); @Override OperationsMetadata parseOperationsMetadata(); OMElement getExtendedCapabilities( String prefix, String localName, String namespaceUri ); void parseWMSSpecificCapabilities( OperationsMetadata operationsMetadata );  }
@Test public void testWMSCapabilitiesLayerIdentifierAnAuthorities() throws XMLStreamException { WMSCapabilitiesAdapter capabilities = createCapabilities(); LayerMetadata layer = capabilities.getLayer( "cite:BuildingCenters" ); List<Pair<String, String>> identifiers = layer.getIdentifiers(); assertEquals( 1, identifiers.size() ); assertEquals( "II.BuildingCenters", identifiers.get( 0 ).first ); assertEquals( "AUTH", identifiers.get( 0 ).second ); List<Pair<String, String>> authorities = layer.getAuthorities(); assertEquals( 1, authorities.size() ); assertEquals( "AUTH", authorities.get( 0 ).first ); assertEquals( "http: }
@Test public void testWMSCapabilitiesStyles() throws XMLStreamException, UnknownCRSException { WMSCapabilitiesAdapter capabilities = createCapabilities(); LayerMetadata layer = capabilities.getLayer( "cite:BasicPolygons" ); Map<String, Style> styles = layer.getStyles(); assertEquals( 1, styles.size() ); assertTrue( styles.containsKey( "default" ) ); }