@Test
  public void testWithRealTime() throws Exception {
    Time time = SystemTime.getInstance();
    long now = time.seconds();
    Throttler throttler = new Throttler(100, -1, true, time);
    Thread.sleep(10);
    throttler.maybeThrottle(500);
    throttler.maybeThrottle(300);
    Assert.assertTrue(time.seconds() - now > 7);
  }
Tests for different check intervals - positive, zero and check every time.
@throws InterruptedException
ambry-utils/src/test/java/com/github/ambry/utils/ThrottlerTest.java