@Test
public void exitOnInterruption() throws Exception {

  taskRunner.run().cancel(true);
  runnables.offer(() -> messages.add("hello"));
  Thread.sleep(300);
  assertThat(runnables.isEmpty(), is(false));
  assertThat(messages.isEmpty(), is(true));
}