@Override public int hashCode() { final int prime = 31; int result = 1; result = (prime * result) + ((this.id == null) ? 0 : this.id.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = (prime * result) + ((this.id == null) ? 0 : this.id.hashCode()); return result; }
@Test public void shouldHaveSymmetricEqulasImplementation() { final MutationIdentifier a = aMutationId().withIndex(1).withMutator("M").build(); final MutationIdentifier b = aMutationId().withIndex(1).withMutator("M").build(); assertTrue(a.equals(b)); assertTrue(b.equals(a)); assertTrue(a.hashCode() == b.hashCode()); }