@Test
public void testTriggerDoesntTriggerTooOften() throws InterruptedException {

    counter.set(0);
    final Throttled<String> throttled = new Throttled<>(10);
    throttled.trigger("x", slowIncrement);
    assertEquals(0, counter.get());
    throttled.trigger("x", slowIncrement);
    assertEquals(0, counter.get());
    waitALittleToAllowExecutorToProcessRunnables();
    assertEquals(1, counter.get());
    for (int i = 0; i < 10; i++) {
        throttled.trigger("x", counter::incrementAndGet);
    }
    Thread.sleep(1100);
    assertEquals(1, counter.get());
}