@Before
  public void setUp() {
    assumeTrue(
        getClass().getSimpleName() + " requires API level 21+ to run",
        Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP);

    testContext = InstrumentationRegistry.getContext();
    appContext = InstrumentationRegistry.getTargetContext();
    uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation();
    connManager = (ConnectivityManager) testContext.getSystemService(Context.CONNECTIVITY_SERVICE);
    dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(appContext));

    TestJobService.setProxy(
        new TestJobService.JobServiceProxy() {
          @Override
          public boolean onStartJob(JobService jobService, JobParameters params) {
            jobStartedFuture.set(null);
            return false;
          }

          @Override
          public boolean onStopJob(JobService jobService, JobParameters params) {
            return false;
          }
        });
  }
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