HerdThreadHelper { @Async public void executeAsync(Runnable runnable) { runnable.run(); }  void sleep(Long millis); @Async void executeAsync(Runnable runnable);  }
@Test public void testExecuteAsync() throws Exception { final BlockingQueue<String> queue = new LinkedBlockingQueue<>(1); herdThreadHelper.executeAsync(new Runnable() { public void run() { try { Thread.sleep(500); queue.offer("testToken"); } catch (InterruptedException e) { throw new RuntimeException(e); } } }); String token = queue.poll(1000, TimeUnit.MILLISECONDS); Assert.assertNotNull("Expected the async task to have put a token in the queue, but none was found after a timeout. Ensure that the async task " + "actually ran and pushed a token into queue.", token); }