### Question:
TaskEvent implements Comparable<TaskEvent> { public long delayTime() { int time = sendCount * 200; if (time > MAX_DELAY_TIME) { time = MAX_DELAY_TIME; } return time - (System.currentTimeMillis() - this.triggerTime); } 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 delayTime() { TaskEvent event1 = new TaskEvent(null); Assert.assertTrue(event1.delayTime() <= 200); event1.incSendCount(); Assert.assertTrue(event1.delayTime() <= 400); event1.incSendCount(); Assert.assertTrue(event1.delayTime() <= 600); event1.incSendCount(); Assert.assertTrue(event1.delayTime() <= 800); event1.incSendCount(); Assert.assertTrue(event1.delayTime() <= 1000); event1.incSendCount(); Assert.assertTrue(event1.delayTime() <= 1000); }