package com.topsy.jmxproxy.jmx;

import com.fasterxml.jackson.annotation.JsonProperty;

import org.hibernate.validator.constraints.NotEmpty;

public class ConnectionCredentials {
    @NotEmpty
    @JsonProperty
    private final String username;

    @NotEmpty
    @JsonProperty
    private final String password;

    public ConnectionCredentials(@JsonProperty("username") String username, @JsonProperty("password") String password) {
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }
}

@@ -634,11 +634,222 @@
 d;%0A    %7D
+%0A%0A    @Override%0A    public boolean equals(Object peer) %7B%0A        ConnectionCredentials auth = (ConnectionCredentials) peer;%0A%0A        return username == auth.getUsername() && password == auth.getPassword();%0A    %7D
 %0A%7D%0A

Add comparison function for credentials class.