code: public static Operation createReplaceOperation(final Set<Deployment> deployments) {
          Assertions.requiresNotNullOrNotEmptyParameter("deployments", deployments);
          final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true);
          for (Deployment deployment : deployments) {
              addReplaceOperationSteps(builder, deployment);
          }
          return builder.build();
      }
docs: Creates an operation to replace deployment content to a running server. The previous content is undeployed, then
  the new content is deployed, followed by the previous content being removed.
  
  @param deployments the set deployment used to replace existing deployments which match the same name
  
  @return the deploy operation