@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof Membership)) {
            return false;
        }
        Membership other = (Membership) obj;
        if (group == null) {
            if (other.group != null) {
                return false;
            }
        } else if (!group.equals(other.group)) {
            return false;
        }
        if (membershipType == null) {
            if (other.membershipType != null) {
                return false;
            }
        } else if (!membershipType.equals(other.membershipType)) {
            return false;
        }
        return true;
    }