static void flushExecutorService(ExecutorService executorService) throws Exception {
    // TODO(user): use a method reference when our gradle build supports them
    final CountDownLatch latch = new CountDownLatch(1);
    executorService.execute(
        new Runnable() {
          @Override
          public void run() {
            latch.countDown();
          }
        });
    assertTrue("Timed out waiting for executor service to run", latch.await(3, SECONDS));
  }
Provides common utilities helpful for testing.
jobdispatcher/src/testLib/com/firebase/jobdispatcher/TestUtil.java