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

    final HeartbeatConsumer hb = new HeartbeatConsumer<String>(Collections.singleton(mock(PartitionedWriter.class)),
            Duration.ofMillis(10));
    hb.run();
}