@Test
public void testExecuteAsync()
                        throws OWSExceptionReport, IOException, XMLStreamException, InterruptedException {

    String demoWPSURL = TestProperties.getProperty( "demo_wps_url" );
    Assume.assumeNotNull( demoWPSURL );
    WPSClient wpsClient = new WPSClient( new URL( demoWPSURL ) );
    org.deegree.protocol.wps.client.process.Process proc = wpsClient.getProcess( "ParameterDemoProcess", null );
    ProcessExecution execution = proc.prepareExecution();
    execution.addLiteralInput( "LiteralInput", null, "5", "integer", "seconds" );
    execution.addBBoxInput( "BBOXInput", null, new double[] { 0, 0 }, new double[] { 90, 180 }, "EPSG:4326" );
    execution.addXMLInput( "XMLInput", null, CURVE_FILE.toURI(), false, "text/xml", null, null );
    execution.addBinaryInput( "BinaryInput", null, BINARY_INPUT.toURI(), false, "image/png", null );
    execution.executeAsync();
    Assert.assertNotSame( ExecutionState.SUCCEEDED, execution.getState() );
    Assert.assertNotSame( ExecutionState.FAILED, execution.getState() );
    while ( ( execution.getState() ) != ExecutionState.SUCCEEDED ) {
        System.out.println( execution.getPercentCompleted() );
        Thread.sleep( 500 );
    }
    ExecutionOutputs outputs = execution.getOutputs();
    LiteralOutput out1 = (LiteralOutput) outputs.get( "LiteralOutput", null );
    Assert.assertEquals( "5", out1.getValue() );
    Assert.assertEquals( "integer", out1.getDataType() );
    // Assert.assertEquals( "seconds", out1.getUom() );
    BBoxOutput out2 = (BBoxOutput) outputs.get( "BBOXOutput", null );
    Assert.assertTrue( Arrays.equals( new double[] { 0.0, 0.0 }, out2.getLower() ) );
    Assert.assertTrue( Arrays.equals( new double[] { 90.0, 180.0 }, out2.getUpper() ) );
    Assert.assertEquals( "EPSG:4326", out2.getCrs() );
    Assert.assertEquals( 2, out2.getDimension() );
}