### Question:
TaskEvent implements Comparable<TaskEvent> { @Override public int hashCode() { int result = source != null ? source.hashCode() : 0; result = 31 * result + sendCount; result = 31 * result + (int) (triggerTime ^ (triggerTime >>> 32)); return result; } TaskEvent(Register source); Register getSource(); void setTriggerTime(long triggerTime); long delayTime(); @Override int compareTo(TaskEvent event); @Override boolean equals(Object o); @Override int hashCode(); int incSendCount();  }### Answer:
@Test public void testHashCode() { TaskEvent event1 = new TaskEvent(null); TaskEvent event2 = new TaskEvent(null); Assert.assertEquals(event1.hashCode(), event2.hashCode()); event1.setTriggerTime(1234); Assert.assertNotEquals(event1.hashCode(), event2.hashCode()); }