Priority extends BasicPriority { @Override public boolean equals(Object obj) { if (obj instanceof Priority) { Priority that = (Priority) obj; return super.equals(obj) && Objects.equal(this.description, that.description) && Objects.equal(this.statusColor, that.statusColor) && Objects.equal(this.iconUrl, that.iconUrl); } return false; } Priority(URI self, String name, String statusColor, String description, URI iconUri); String getStatusColor(); String getDescription(); URI getIconUri(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testEquals() throws Exception { TestUtil.assertEqualsSymmetrical(P1, P2); assertEquals(P1, P1); assertNotEquals(P1, null); assertNotEquals(P1, P3); assertNotEquals(P1, P4); assertNotEquals(P1, P5); assertNotEquals(P1, P6); assertNotEquals(P1, P7); }