DefaultOWSMetadataProvider implements OWSMetadataProvider { @Override public List<DatasetMetadata> getDatasetMetadata() { return datasetMetadata; } DefaultOWSMetadataProvider( ServiceIdentification si, ServiceProvider sp,
                                       Map<String, List<OMElement>> extendedCapabilities,
                                       List<DatasetMetadata> datasetMetadata, Map<String, String> authorities,
                                       ResourceMetadata<OWSMetadataProvider> metadata ); @Override void init(); @Override void destroy(); @Override ServiceIdentification getServiceIdentification(); @Override ServiceProvider getServiceProvider(); @Override Map<String, List<OMElement>> getExtendedCapabilities(); @Override List<DatasetMetadata> getDatasetMetadata(); @Override DatasetMetadata getDatasetMetadata( QName name ); @Override List<DatasetMetadata> getAllDatasetMetadata( QName name ); @Override Map<String, String> getExternalMetadataAuthorities(); @Override ResourceMetadata<? extends Resource> getMetadata();  }
@Test public void testGetDatasetMetadata() throws Exception { DefaultOWSMetadataProvider metadataProvider = createProvider(); List<DatasetMetadata> datasetMetadata = metadataProvider.getDatasetMetadata(); assertThat( datasetMetadata.size(), is( 3 ) ); }
@Test public void testGetDatasetMetadataByName() throws Exception { DefaultOWSMetadataProvider metadataProvider = createProvider(); DatasetMetadata datasetMetadata = metadataProvider.getDatasetMetadata( new QName( "name1" ) ); assertThat( datasetMetadata, is( notNullValue() ) ); }