### Question:
ConnectionResponse extends AdminServicesAPIResponse { @Override public int hashCode() { if (connection == null) { return super.hashCode(); } else { return connection.hashCode(); } } ConnectionResponse();  ConnectionResponse(ConnectionResponse  template); Connection getConnection(); void setConnection(Connection connection); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testHashCode() { assertTrue(getTestObject().hashCode() == getTestObject().hashCode()); ConnectionResponse testObject = getTestObject(); testObject.setConnection(null); assertTrue(testObject.hashCode() != 0); }