WMSCapabilitiesAdapter extends XMLAdapter implements OWSCapabilitiesAdapter { public boolean hasLayer( String name ) { return getLayer( name ) != null; }  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 testWMSCapabilitiesHasLayerUnknown() throws XMLStreamException { WMSCapabilitiesAdapter capabilities = createCapabilities(); assertFalse( capabilities.hasLayer( "Unknown Layer" ) ); }
@Test public void testWMSCapabilitiesHasLayer() throws XMLStreamException { WMSCapabilitiesAdapter capabilities = createCapabilities(); assertTrue( capabilities.hasLayer( "cite:NamedPlaces" ) ); }