EntitySeed extends ElementSeed implements EntityId { @Override public int hashCode() { return Objects.hashCode(vertex); } EntitySeed();  EntitySeed(final Object vertex); @Override Object getVertex(); @Override void setVertex(final Object vertex); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void shouldBeEqualWhenVerticesEqual() { final String vertex = "vertex"; final EntityId seed1 = new EntitySeed(vertex); final EntityId seed2 = new EntitySeed(vertex); assertEquals(seed1, seed2); assertEquals(seed1.hashCode(), seed2.hashCode()); }
@Test public void shouldNotBeEqualWhenVerticesEqual() { final EntityId seed1 = new EntitySeed("vertex"); final EntityId seed2 = new EntitySeed("other vertex"); assertNotEquals(seed1, seed2); assertNotEquals(seed1.hashCode(), seed2.hashCode()); }