@Test public void testIfCancelled_callbackExceptionIgnored() {

  CompletableFuture<String> future = new CompletableFuture<>();
  future.cancel(false);
  Utils.ifCancelled(future, e -> {throw new NullPointerException();});
  assertThat(future.isCancelled()).isTrue();
}