void performCleanUp(@Nullable Runnable task) {
    evictionLock.lock();
    try {
      maintenance(task);
    } finally {
      evictionLock.unlock();
    }
    rescheduleCleanUpIfIncomplete();
  }
@Test
  @CheckMaxLogLevel(ERROR)
  public void cleanupTask_exception() {
    var expected = new RuntimeException();
    BoundedLocalCache<?, ?> cache = Mockito.mock();
    doThrow(expected).when(cache).performCleanUp(any());
    var task = new PerformCleanupTask(cache);
    assertThat(task.exec()).isFalse();
    assertThat(logEvents()
        .withMessage("Exception thrown when performing the maintenance task")
        .withThrowable(expected)
        .withLevel(ERROR)
        .exclusively())
        .hasSize(1);
  }