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

    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 );
    RawProcessExecution execution = proc.prepareRawExecution();
    execution.addLiteralInput( "LiteralInput", null, "0", "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 );
    ComplexOutput out = execution.executeComplexOutput( "BinaryOutput", null, "image/png", null, null );
    InputStream stream = out.getAsBinaryStream();
    FileOutputStream fileStream = new FileOutputStream( File.createTempFile( "wpsBinaryOut", "" ) );
    byte[] b = new byte[1024];
    int read = -1;
    while ( ( read = stream.read( b ) ) != -1 ) {
        fileStream.write( b, 0, read );
    }
    fileStream.close();
    stream.close();
}