### Question:
XmlSchemaDTO { @Override public int hashCode() { return new HashCodeBuilder() .append(this.location) .toHashCode(); } XmlSchemaDTO(final String location); String getLocation(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void hashCodeIsRepeatable() { final int hashCode = x.hashCode(); for (int i = 0; i < 10; i++) { assertEquals("Hash code is not repeatable", hashCode, x.hashCode()); } }
@Test public void hashCodeConsistentWithEquals() { assertFalse("Expected different hash codes for not equal objects", x.hashCode() == notX.hashCode()); }