@Test
  public void testCancelJob_unavailable() throws Exception {
    setDriverAvailability(false); // driver is unavailable

    assertEquals(FirebaseJobDispatcher.CANCEL_RESULT_NO_DRIVER_AVAILABLE, dispatcher.cancel("foo"));

    // verify the driver was never even consulted
    verify(driver, never()).cancel("foo");
  }
Tests for the {@link FirebaseJobDispatcher} class.
jobdispatcher/src/test/java/com/firebase/jobdispatcher/FirebaseJobDispatcherTest.java