TimeoutValueException extends TimeoutException { public static TimeoutValueException fromMilliseconds(final long timeoutDeadline, final long timeoutActual) { return new TimeoutValueException(Timeout.ofMilliseconds(min0(timeoutDeadline)), Timeout.ofMilliseconds(min0(timeoutActual))); } TimeoutValueException(final Timeout deadline, final Timeout actual); static TimeoutValueException fromMilliseconds(final long timeoutDeadline, final long timeoutActual); Timeout getActual(); Timeout getDeadline();  }
@Test public void testMessage() { Assert.assertEquals("Timeout deadline: 1000 MILLISECONDS, actual: 2000 MILLISECONDS", TimeoutValueException.fromMilliseconds(1000, 2000).getMessage()); }