@Test
public void partitionsRevokedNoTopic() {

    final Consumer<Long, String> consumer = mock(Consumer.class);
    final PartitionedWriter writer = mock(PartitionedWriter.class);
    final java.util.function.Consumer partitionsRevokedConsumer = mock(java.util.function.Consumer.class);
    final OffsetResetter offsetResetter = new OffsetResetter<>(consumer, partitionsRevokedConsumer,
            Collections.singleton(writer));
    offsetResetter.onPartitionsRevoked(Collections.emptyList());
    verify(writer, times(1)).close();
    verifyZeroInteractions(partitionsRevokedConsumer);
}