### Question:
GenericErrorTimeController { public void setTimeout(final TimeAmount duration) { expiresOn = now() + duration.getTimeAmount(); }  boolean isExpired(); void setTimeout(final TimeAmount duration);  }### Answer:
@Test public void setTimeoutTest() { final TimeAmount tenMinutes = TimeAmount.TEN_MINUTES; doReturn(1234L).when(genericErrorTimeController).now(); genericErrorTimeController.setTimeout(tenMinutes); assertEquals(1234L + tenMinutes.getTimeAmount(), genericErrorTimeController.getExpiresOn()); }