ResourceItemCommonDataId implements Serializable, Comparable<ResourceItemCommonDataId> { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof ResourceItemCommonDataId)) return false; ResourceItemCommonDataId id = (ResourceItemCommonDataId) obj; return new EqualsBuilder().append(this.resourceName, id.resourceName) .append(this.resourceItemId, id.resourceItemId).isEquals(); } @SuppressWarnings("unused") private  ResourceItemCommonDataId();  ResourceItemCommonDataId(String resourceName, String resourceItemId); @Override int compareTo(ResourceItemCommonDataId o); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); String getResourceName(); String getResourceItemId();  }
@Test public void testEquals() { ResourceItemCommonDataId target = new ResourceItemCommonDataId("resourceName0", "resourceItemId0"); ResourceItemCommonDataId eq = new ResourceItemCommonDataId(target.getResourceName(), target.getResourceItemId()); assertThat(target.equals(eq), is(true)); ResourceItemCommonDataId ne1 = new ResourceItemCommonDataId("resourceName1", target.getResourceItemId()); assertThat(target.equals(ne1), is(false)); ResourceItemCommonDataId ne2 = new ResourceItemCommonDataId(target.getResourceName(), "resourceItemId1"); assertThat(target.equals(ne2), is(false)); }