### Question:
RestSource extends AbstractSource implements Configurable, PollableSource { @Override public void start() { this.jobDetail = JobBuilder.newJob(RequestJob.class).withIdentity(DEFAULT_JOBNAME).build(); Trigger trigger = TriggerBuilder .newTrigger() .withIdentity(DEFAULT_JOBNAME) .withSchedule( SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(frequency) .repeatForever()).build(); try { scheduler = new StdSchedulerFactory().getScheduler(); scheduler.getContext().put("client", client); scheduler.getContext().put("queue", queue); scheduler.getContext().put("properties", properties); scheduler.getContext().put("restSourceHandler", restSourceHandler); scheduler.getContext().put("urlHandler", urlHandler); scheduler.start(); scheduler.scheduleJob(jobDetail, trigger); } catch (SchedulerException e) { log.error("RestSource error. " + e.getMessage()); } } RestSource();  RestSource(Client client); @Override void configure(Context context); @Override void start(); @Override Status process(); @Override void stop();  }### Answer:
@Test public void checkStartFailure() throws EventDeliveryException { when(schedulerContext.get("client")).thenReturn(null); rest.start(); Assert.assertNull(rest.getName()); }