@Test
public void shouldGiveRandomizedDelay() {

  var statistics = LongStream.range(0, 10000)
      .map(i -> Scheduler.randomizedDelay())
      .summaryStatistics();
  assertThat(statistics.getAverage(), is(closeTo(RANDOMIZED_DELAY_BASE, RANDOMIZED_DELAY_BASE / 2.0)));
  assertThat(statistics.getMin(), is(
      both(greaterThanOrEqualTo(RANDOMIZED_DELAY_BASE / 2))
          .and(lessThanOrEqualTo((long) (RANDOMIZED_DELAY_BASE * 1.5)))));
  assertThat(statistics.getMax(), is(
      both(greaterThanOrEqualTo(RANDOMIZED_DELAY_BASE))
          .and(lessThanOrEqualTo((long) (RANDOMIZED_DELAY_BASE * 1.5)))));
}