### Question:
DbArcId { @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof DbArcId)) { return false; } DbArcId id = (DbArcId) object; return new EqualsBuilder().append(sourceId, id.sourceId) .append(incomingArc.getName(), id.incomingArc.getName()) .isEquals(); } DbArcId(ObjectId sourceId, DbRelationship incomingArc); @Override int hashCode(); @Override boolean equals(Object object);  }### Answer:
@Test public void testEquals() { DbArcId id1 = new DbArcId(ObjectId.of("x", "k", "v"), new DbRelationship("r1")); assertEquals(id1, id1); DbArcId id1_eq = new DbArcId(ObjectId.of("x", "k", "v"), new DbRelationship("r1")); assertEquals(id1, id1_eq); assertEquals(id1_eq, id1); DbArcId id2 = new DbArcId(ObjectId.of("x", "k", "v"), new DbRelationship("r2")); assertNotEquals(id1, id2); DbArcId id3 = new DbArcId(ObjectId.of("y", "k", "v"), new DbRelationship("r1")); assertNotEquals(id1, id3); assertNotEquals(id1, new Object()); }