@Test
public void testMetadata()
                        throws OWSExceptionReport, IOException {

    String demoWPSURL = TestProperties.getProperty( "demo_wps_url" );
    Assume.assumeNotNull( demoWPSURL );
    URL serviceUrl = new URL( demoWPSURL );
    WPSClient client = new WPSClient( serviceUrl );
    Assert.assertNotNull( client );
    ServiceIdentification serviceId = client.getMetadata().getServiceIdentification();
    Assert.assertNotNull( serviceId );
    Assert.assertEquals( 1, serviceId.getTitles().size() );
    Assert.assertNotNull( serviceId.getTitles().get( 0 ).getString() ); 
    Assert.assertEquals( 1, serviceId.getAbstracts().size() );
    Assert.assertNotNull( serviceId.getAbstracts().get( 0 ).getString() );
    Assert.assertEquals( "WPS", serviceId.getServiceType().getCode() );
    Assert.assertEquals( "1.0.0", serviceId.getServiceTypeVersion().get( 0 ).toString() );
    ServiceProvider serviceProvider = client.getMetadata().getServiceProvider();
    Assert.assertEquals( "lat/lon GmbH", serviceProvider.getProviderName() );
    Assert.assertEquals( "http://www.lat-lon.de", serviceProvider.getProviderSite() );
    ResponsibleParty serviceContact = serviceProvider.getServiceContact();
    Assert.assertNotNull( serviceContact.getIndividualName() );
    Assert.assertNotNull( serviceContact.getPositionName() );
    ContactInfo contactInfo = serviceContact.getContactInfo();
    Assert.assertEquals( "0228/18496-0", contactInfo.getPhone().getVoice().get( 0 ) );
    Assert.assertEquals( "0228/18496-29", contactInfo.getPhone().getFacsimile().get( 0 ) );
    Assert.assertEquals( "Aennchenstr. 19", contactInfo.getAddress().getDeliveryPoint().get( 0 ) );
    Assert.assertEquals( "Bonn", contactInfo.getAddress().getCity() );
    Assert.assertEquals( "NRW", contactInfo.getAddress().getAdministrativeArea() );
    Assert.assertEquals( "53177", contactInfo.getAddress().getPostalCode() );
    Assert.assertEquals( "Germany", contactInfo.getAddress().getCountry() );
    Assert.assertNotNull( contactInfo.getAddress().getElectronicMailAddress().get( 0 ) );
    Assert.assertEquals( "http://www.deegree.org", contactInfo.getOnlineResource().toExternalForm() );
    Assert.assertEquals( "24x7", contactInfo.getHoursOfService() );
    Assert.assertEquals( "Do not hesitate to call", contactInfo.getContactInstruction() );
    Assert.assertEquals( "PointOfContact", serviceContact.getRole().getCode() );
    OperationsMetadata opMetadata = client.getMetadata().getOperationsMetadata();
    Operation op; 
    
    op = opMetadata.getOperation("GetCapabilities"); 
    Assert.assertNotNull( op.getGetUrls().get( 0 ).toExternalForm() );
    Assert.assertNotNull( op.getPostUrls().get( 0 ).toExternalForm() );
    
    op = opMetadata.getOperation("DescribeProcess"); 
    Assert.assertNotNull( op.getGetUrls().get( 0 ).toExternalForm() );
    Assert.assertNotNull( op.getPostUrls().get( 0 ).toExternalForm() );
    
    op = opMetadata.getOperation("Execute"); 
    Assert.assertNotNull( op.getGetUrls().get( 0 ).toExternalForm() );
    Assert.assertNotNull( op.getPostUrls().get( 0 ).toExternalForm() );
}