Content extends AbstractHibernateObject implements SharedEntity, Cloneable, ContentInfo { @Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof Content) { Content that = (Content) other; boolean equals = new EqualsBuilder() .append(this.id, that.id) .append(this.type, that.type) .append(this.label, that.label) .append(this.name, that.name) .append(this.vendor, that.vendor) .append(this.contentUrl, that.contentUrl) .append(this.requiredTags, that.requiredTags) .append(this.releaseVer, that.releaseVer) .append(this.gpgUrl, that.gpgUrl) .append(this.metadataExpire, that.metadataExpire) .append(this.arches, that.arches) .isEquals(); if (equals) { if (!Util.collectionsAreEqual(this.modifiedProductIds, that.modifiedProductIds)) { return false; } } return equals; } return false; } Content();  Content(String id);  Content(String id, String name, String type, String label, String vendor); protected  Content(Content source); Content merge(Content source); @Override Content clone(); ContentData toDTO(); String getUuid(); void setUuid(String uuid); @Override String getId(); void setId(String id); @Override String getType(); void setType(String type); @Override String getLabel(); void setLabel(String label); @Override String getName(); void setName(String name); @Override String getVendor(); void setVendor(String vendor); @Override String getContentUrl(); void setContentUrl(String contentUrl); @Override String getRequiredTags(); void setRequiredTags(String requiredTags); @Override String getReleaseVersion(); void setReleaseVersion(String releaseVer); @Override String getGpgUrl(); void setGpgUrl(String gpgUrl); @Override Long getMetadataExpiration(); void setMetadataExpiration(Long metadataExpire); Collection<String> getModifiedProductIds(); @Override Collection<String> getRequiredProductIds(); boolean addModifiedProductId(String productId); boolean removeModifiedProductId(String productId); Content setModifiedProductIds(Collection<String> requiredProductIds); void setArches(String arches); @Override String getArches(); @XmlTransient @JsonIgnore Content setLocked(boolean locked); @XmlTransient boolean isLocked(); @Override boolean equals(Object other); @Override int hashCode(); int getEntityVersion(); @Override String toString(); @PrePersist @PreUpdate void updateEntityVersion(); static final String DB_TABLE; }
@Test public void testBaseEquality() { Content lhs = new Content(); Content rhs = new Content(); assertFalse(lhs.equals(null)); assertTrue(lhs.equals(lhs)); assertTrue(rhs.equals(rhs)); assertTrue(lhs.equals(rhs)); assertTrue(rhs.equals(lhs)); }