SmsJobService extends JobService { @Override public boolean onStopJob(JobParameters jobParameters) { if (LOCAL_LOGV) { Log.v(TAG, "onStopJob(" + jobParameters + ", extras=" + jobParameters.getExtras() + ")"); } App.post(new CancelEvent(SYSTEM)); return false; }  @Override void onCreate(); @Override void onDestroy(); @Override boolean onStartJob(JobParameters jobParameters); @Override boolean onStopJob(JobParameters jobParameters); @Subscribe void backupStateChanged(BackupState state);  }
@Test public void testOnStopJob() { final JobParameters jobParameters = mock(JobParameters.class); boolean shouldRetry = smsJobService.onStopJob(jobParameters); assertThat(shouldRetry).isFalse(); }