@Test
public void testPersistentThrowsError() throws IOException {

    final Error error = new Error("expected error");
    doThrow(error).when(persistentManager).freezeAllFilters(bloomFilterManager);
    filterUpdateTimesCounter.add(100);
    assertThatThrownBy(() -> job.run()).isSameAs(error);
    assertThat(filterUpdateTimesCounter.sum()).isZero();
    verify(persistentManager, times(1)).freezeAllFilters(bloomFilterManager);
}