@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        SubscriptionType o = (SubscriptionType) obj;
        return (publisher == null ? o.publisher == null : publisher.equals(o.publisher)) &&
               (subscriber == null ? o.subscriber == null : subscriber.equals(o.subscriber)) &&
               price == o.price;
    }