DeploymentManager deployMgr = getDeploymentManager();
// Distribute
DeploymentProgress distribute = deployMgr.distribute(deploymentName,
getDeployURL(deployment), options);
distribute.run();
// Distribute always has to complete
assertComplete(distribute);
// check if the app is stopped
assertDeploymentState(distribute.getDeploymentID(), DeploymentState.STOPPED);