@Test public void testFinishesSynchronously() { JobService.Binder binder = (JobService.Binder) Robolectric.buildService(NoopJobService.class).create().get().onBind(null); assertFalse(binder.startJob(params, null)); }
@NonNull @Override public final IBinder onBind(Intent intent) { if (binder == null) { binder = new Binder(this); } return binder; }
JobService extends Service { @NonNull @Override public final IBinder onBind(Intent intent) { if (binder == null) { binder = new Binder(this); } return binder; } }
JobService extends Service { @NonNull @Override public final IBinder onBind(Intent intent) { if (binder == null) { binder = new Binder(this); } return binder; }  }
JobService extends Service { @NonNull @Override public final IBinder onBind(Intent intent) { if (binder == null) { binder = new Binder(this); } return binder; }  @NonNull @Override final IBinder onBind(Intent intent); abstract boolean onStartJob(JobParameters params); abstract boolean onStopJob(JobParameters params); final void jobFinished(JobParameters params, boolean needsReschedule); }
JobService extends Service { @NonNull @Override public final IBinder onBind(Intent intent) { if (binder == null) { binder = new Binder(this); } return binder; }  @NonNull @Override final IBinder onBind(Intent intent); abstract boolean onStartJob(JobParameters params); abstract boolean onStopJob(JobParameters params); final void jobFinished(JobParameters params, boolean needsReschedule);  }