### Question:
GcmJobSchedulerService extends GcmTaskService { @SuppressWarnings("unused") public static GcmScheduler createSchedulerFor(Context appContext, Class<? extends GcmJobSchedulerService> klass) { if (GcmJobSchedulerService.class == klass) { throw new IllegalArgumentException("You must create a service that extends" + " GcmJobSchedulerService"); } return new GcmScheduler(appContext.getApplicationContext(), klass); }  @SuppressWarnings("unused") static GcmScheduler createSchedulerFor(Context appContext,
                                                  Class<? extends GcmJobSchedulerService> klass); @Override int onRunTask(TaskParams taskParams);  }### Answer:
@Test public void createScheduler() { GcmScheduler scheduler = GcmJobSchedulerService .createSchedulerFor(RuntimeEnvironment.application, GcmJobSchedulerServiceImpl.class); assertThat(scheduler.serviceClass == GcmJobSchedulerServiceImpl.class, is(true)); }
@Test(expected = IllegalArgumentException.class) public void createBadScheduler() { GcmJobSchedulerService.createSchedulerFor(RuntimeEnvironment.application, GcmJobSchedulerService.class); }