@Test
public void can_not_submit_tasks_after_shutdown() throws
    InterruptedException {

  // given
  final ExecutorService service = Executors.newSingleThreadExecutor();
  service.submit(this::sleep);
  // when
  this.executorServiceUtils.gracefulShutdown(service, Duration.ofMillis(1));
  final Throwable thrown = catchThrowable(() -> service.submit(this::sleep));
  // then
  assertThat(thrown).isInstanceOf(RejectedExecutionException.class);
}