@Override
          public void onReceive(Context context, Intent intent) {
            Log.i(WorkerProcessTestJobService.TAG, "BroadcastReceiver intent " + intent);
            int eventType =
                intent.getExtras().getInt(WorkerProcessTestJobService.EXTRA_EVENT_TYPE, -1);
            String tag = intent.getExtras().getString(WorkerProcessTestJobService.EXTRA_BUNDLE_TAG);
            assertNotNull(tag);

            switch (eventType) {
              case WorkerProcessTestJobService.EVENT_TYPE_ON_START_JOB:
                startedJobs.add(tag);
                startLatch.countDown();
                break;
              case WorkerProcessTestJobService.EVENT_TYPE_ON_STOP_JOB:
                stoppedJobs.add(tag);
                stopLatch.countDown();
                break;
              default:
                fail("Unexpected event type " + eventType);
            }
            Bundle results = new Bundle();
            results.putBoolean(WorkerProcessTestJobService.EXTRA_MORE_WORK_REMAINING, true);
            setResultExtras(results);
          }
Basic end to end test for the JobDispatcher. Requires Google Play services be installed and
available.
jobdispatcher/src/androidTest/java/com/firebase/jobdispatcher/EndToEndAndroidTest.java