@Test(timeout = 3000)
public void writerExpirer() throws InterruptedException {

    final PartitionedWriter<String> firstConsumer = mock(PartitionedWriter.class);
    final PartitionedWriter<String> secondConsumer = mock(PartitionedWriter.class);
    final PartitionedWriter.Expirer<String> expirer = new PartitionedWriter.Expirer<>(
            Arrays.asList(firstConsumer, secondConsumer), Duration.ofMillis(1));
    expirer.run();
    verify(firstConsumer, atLeastOnce()).expireConsumers();
    verify(secondConsumer, atLeastOnce()).expireConsumers();
}