private void verifyJobDoesntRunInAirplaneMode(Job job) throws Exception {
    // Verify that the job does not run while the device is in airplane mode
    enableAirplaneMode();
    dispatcher.mustSchedule(job);
    try {
      jobStartedFuture.get(EXECUTE_JOB_TIMEOUT_SECONDS, TimeUnit.SECONDS);
      fail("Shouldn't have run job with network constraints while in airplane mode");
    } catch (TimeoutException e) {
      // expected
    }

    // Verify that the job runs after airplane mode is disabled
    disableAirplaneMode();
    try {
      jobStartedFuture.get(EXECUTE_JOB_TIMEOUT_SECONDS, TimeUnit.SECONDS);
    } catch (CancellationException
        | ExecutionException
        | InterruptedException
        | TimeoutException e) {
      throw new AssertionError(
          "Should have run job with network constraints once airplane mode was disabled", e);
    }
  }
How long we're willing to wait for a job to run after it becomes eligible.
jobdispatcher/src/androidTest/java/com/firebase/jobdispatcher/AirplaneModeAndroidTest.java