Tag extends BaseModel<Tag> implements Comparable<Tag> { @Override public boolean equals(Object obj) { return obj instanceof Tag && StringUtils.equalsIgnoreCase(this.getTagValue(), ((Tag) obj).getTagValue()); } Tag();  Tag(String tagValue); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(Tag other);  }
@Test public void testEquals() { Tag tag1 = new Tag(); tag1.setTagValue("testTag1"); assertTrue(!tag1.equals(new User())); Tag tag2 = new Tag(); tag2.setTagValue("testTag2"); assertTrue(!tag1.equals(tag2)); tag2.setTagValue("testTag1"); tag2.setPerfTests(new HashSet<PerfTest>()); assertTrue(tag1.equals(tag2)); }