### Question:
GcmScheduler extends Scheduler { long getExecutionWindowSizeInSeconds() { return TimeUnit.DAYS.toSeconds(7); } GcmScheduler(Context context, Class<? extends GcmJobSchedulerService> serviceClass); @Override void request(SchedulerConstraint constraint); @Override void cancelAll(); @Override void onFinished(SchedulerConstraint constraint, boolean reschedule);  }### Answer:
@Test public void delay() { long delaySeconds = 3; SchedulerConstraint constraint = mock(SchedulerConstraint.class); when(constraint.getNetworkStatus()).thenReturn(NetworkUtil.DISCONNECTED); when(constraint.getDelayInMs()).thenReturn(TimeUnit.SECONDS.toMillis(delaySeconds)); when(constraint.getOverrideDeadlineInMs()).thenReturn(null); OneoffTask jobInfo = schedule(constraint); assertThat(jobInfo.isPersisted(), is(true)); assertThat(jobInfo.getWindowStart(), is(delaySeconds)); assertThat(jobInfo.getWindowEnd(), is(delaySeconds + gcmScheduler.getExecutionWindowSizeInSeconds())); }