code: public static Operation createReplaceOperation(final Deployment deployment) {
          Assert.checkNotNullParam("deployment", deployment);
          final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true);
          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 deployment the deployment used to replace an existing deployment
  
  @return the deploy operation