### Question:
DbArcId { @Override public int hashCode() { if (this.hashCode == 0) { HashCodeBuilder builder = new HashCodeBuilder(3, 5); builder.append(sourceId); builder.append(incomingArc.getName()); this.hashCode = builder.toHashCode(); } return hashCode; } DbArcId(ObjectId sourceId, DbRelationship incomingArc); @Override int hashCode(); @Override boolean equals(Object object);  }### Answer:
@Test public void testHashCode() { DbArcId id1 = new DbArcId(ObjectId.of("x", "k", "v"), new DbRelationship("r1")); int h1 = id1.hashCode(); assertEquals(h1, id1.hashCode()); assertEquals(h1, id1.hashCode()); DbArcId id1_eq = new DbArcId(ObjectId.of("x", "k", "v"), new DbRelationship("r1")); assertEquals(h1, id1_eq.hashCode()); DbArcId id2 = new DbArcId(ObjectId.of("x", "k", "v"), new DbRelationship("r2")); assertNotEquals(h1, id2.hashCode()); DbArcId id3 = new DbArcId(ObjectId.of("y", "k", "v"), new DbRelationship("r1")); assertNotEquals(h1, id3.hashCode()); }