GooglePlayReceiver extends Service implements ExecutionDelegator.JobFinishedCallback { static void onSchedule(Job job) { synchronized (callbacks) { SimpleArrayMap<String, JobCallback> jobs = callbacks.get(job.getService()); if (jobs == null) { return; } JobCallback jobCallback = jobs.get(job.getTag()); if (jobCallback == null) { return; } } JobInvocation key = new JobInvocation.Builder() .setTag(job.getTag()) .setService(job.getService()) .setTrigger(job.getTrigger()) .build(); ExecutionDelegator.stopJob(key, false ); }  @Override final int onStartCommand(Intent intent, int flags, int startId); @Nullable @Override IBinder onBind(Intent intent); @Override void onJobFinished(@NonNull JobInvocation js, @JobResult int result);  }
@Test public void onReschedule_notRunning_noException() { Job job = TestUtil.getBuilderWithNoopValidator() .setService(TestJobService.class) .setTrigger(Trigger.NOW) .setTag("TAG") .build(); GooglePlayReceiver.onSchedule(job); }