@Override
  public void addToQueue(Runnable r) {
    requireNonNull(r);
    executorService.addToQueue(() -> {
      try {
        r.run();
      } catch (Exception e) {
        LOG.error("Asynchronous task failed", e);
      }
    });
  }
@Test
  public void addToQueue_fails_with_NPE_if_Runnable_is_null() {
    assertThatThrownBy(() -> underTest.addToQueue(null))
      .isInstanceOf(NullPointerException.class);
  }