package enmasse.systemtest.amqp;

import io.vertx.proton.ProtonClientOptions;
import org.apache.qpid.proton.amqp.messaging.Source;
import org.apache.qpid.proton.amqp.messaging.Target;

import java.util.Optional;

/**
 * Options for EnMasse client
 */
public class ClientOptions {
    private final Source source;
    private final Target target;
    private final ProtonClientOptions protonClientOptions;
    private final Optional<String> linkName;

    public ClientOptions(Source source, Target target, ProtonClientOptions protonClientOptions, Optional<String> linkName) {
        this.source = source;
        this.target = target;
        this.protonClientOptions = protonClientOptions;
        this.linkName = linkName;
    }

    public Source getSource() {
        return source;
    }

    public ProtonClientOptions getProtonClientOptions() {
        return protonClientOptions;
    }

    public Target getTarget() {
        return target;
    }

    public Optional<String> getLinkName() {
        return linkName;
    }
}

@@ -773,22 +773,38 @@
  return 
-source
+(Source) source.copy()
 ;%0A    %7D%0A
@@ -952,22 +952,38 @@
  return 
-target
+(Target) target.copy()
 ;%0A    %7D%0A

Copy source and target