### Question:
BackoffDelay { @Override public String toString() { if (min == max && max == delay) { return "{" + delay.toMillis() + "ms}"; } else { return "{" + delay.toMillis() + "ms/" + max.toMillis() + "ms}"; } } BackoffDelay(Duration fixedBackoff);  BackoffDelay(Duration min, Duration max, Duration delay); Duration minDelay(); Duration maxDelay(); Duration delay(); @Override String toString();  }### Answer:
@Test void toStringZero() { assertEquals("{ZERO}", BackoffDelay.ZERO.toString()); }
@Test void toStringExhausted() { assertEquals("{EXHAUSTED}", AbstractRetry.RETRY_EXHAUSTED.toString()); }
@Test void toStringSimple() { assertEquals("{3000ms}", new BackoffDelay(Duration.ofSeconds(3)).toString()); }
@Test void toStringMinMaxDelay() { assertEquals("{123ms/4000ms}", new BackoffDelay( Duration.ofSeconds(3), Duration.ofSeconds(4), Duration.ofMillis(123) ).toString()); }
@Test public void toStringZero() { assertThat(BackoffDelay.ZERO.toString()) .isEqualTo("{ZERO}"); }
@Test public void toStringExhausted() { assertThat(AbstractRetry.RETRY_EXHAUSTED.toString()) .isEqualTo("{EXHAUSTED}"); }
@Test public void toStringSimple() { assertThat(new BackoffDelay(Duration.ofSeconds(3)).toString()) .isEqualTo("{3000ms}"); }
@Test public void toStringMinMaxDelay() { assertThat(new BackoffDelay( Duration.ofSeconds(3), Duration.ofSeconds(4), Duration.ofMillis(123) ).toString()) .isEqualTo("{123ms/4000ms}"); }