InputStream deploymentPlan = createDeploymentPlan(archive.getName());
// Deploy the test archive
InputStream inputStream = archive.as(ZipExporter.class).exportAsInputStream();
ProgressObject progress = manager.distribute(targets, inputStream, deploymentPlan);
StateType state = awaitCompletion(progress, TIMEOUT);
if (state == StateType.COMPLETED) {
progress = manager.start(progress.getResultTargetModuleIDs());
awaitCompletion(progress, TIMEOUT);
}