@Test
public void testExpiredFilter() {

    final AdjustableTimer timer = new AdjustableTimer();
    final ZonedDateTime creation = ZonedDateTime.now(ZoneOffset.UTC);
    final ZonedDateTime expiration = creation.plusSeconds(10);
    final GuavaBloomFilter filter = new GuavaBloomFilter(
            1000,
            0.001,
            creation,
            expiration,
            null,
            timer);
    timer.setNow(expiration);
    assertThat(filter.expired()).isFalse();
    timer.setNow(expiration.plusSeconds(1));
    assertThat(filter.expired()).isTrue();
}