### Question:
DataTypeUrl { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((dataTypeId == null) ? 0 : dataTypeId.hashCode()); result = prime * result + ((dataTypeManagerId == null) ? 0 : dataTypeManagerId.hashCode()); result = prime * result + ((dataTypeName == null) ? 0 : dataTypeName.hashCode()); return result; } DataTypeUrl(DataType dt);  DataTypeUrl(String url); UniversalID getDataTypeManagerId(); UniversalID getDataTypeId(); String getDataTypeName(); DataType getDataType(DataTypeManagerService service); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testHashCode() { String name = "string"; FakeDataType dt = new FakeDataType(name); DataTypeUrl dtUrl1 = new DataTypeUrl(dt); DataTypeUrl dtUrl2 = new DataTypeUrl(dt); assertEquals(dtUrl1.hashCode(), dtUrl2.hashCode()); FakeDataType otherDt = new FakeDataType("otherType"); DataTypeUrl otherDtUrl = new DataTypeUrl(otherDt); assertNotEquals(dtUrl1.hashCode(), otherDtUrl.hashCode()); }