package com.silverpop.api.client.result;

import com.silverpop.api.client.ApiResult;
import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("RESULT")
public class OptOutRecipientResult implements ApiResult {

    @XStreamAlias("RecipientId")
    private String recipientId;

    @XStreamAlias("SUCCESS")
    private String success;

    @XStreamAlias("ORGANIZATION_ID")
    private String organizationId;

    public String getRecipientId() {
        return recipientId;
    }

    public boolean isSuccessful() {
        // For some reason, the server side returns a success element of "SUCCESS" instead of true or false.
        // This is a hardcoded workaround that I recommend should be fixed by someone later.

        if (success == "SUCCESS")
        {
            return true;
        } else {
            return false;
        }
    }

    public String getOrganizationId() {
        return organizationId;
    }

}

@@ -740,121 +740,131 @@
     
-if (success == %22SUCCESS%22)%0A        %7B%0A            return true;%0A        %7D else %7B%0A            return false;%0A        %7D
+// you should use the String.equals.. instead of an == on a String%0A        return %22SUCCESS%22.equalsIgnoreCase(this.success);
 %0A   

Update OptOutRecipientResult.java