### Question:
AlarmService extends AbstractService implements LensService { @Override public synchronized void start() { try { scheduler.start(); log.info("Alarm service started successfully!"); } catch (SchedulerException e) { isHealthy = false; healthCause = "Failed to start the Quartz Scheduler for AlarmService."; log.error(healthCause, e); throw new IllegalStateException("Could not start the Alarm service", e); } } AlarmService(); @Override HealthStatus getHealthStatus(); synchronized void init(HiveConf hiveConf); @Override synchronized void start(); @Override synchronized void stop(); List<JobExecutionContext> getCurrentlyExecutingJobs(); void schedule(DateTime start, DateTime end, XFrequency frequency, String jobHandle); boolean unSchedule(SchedulerJobHandle jobHandle); boolean checkExists(SchedulerJobHandle handle); void pauseJob(SchedulerJobHandle jobHandle); void resumeJob(SchedulerJobHandle jobHandle); static final String NAME; static final String LENS_JOBS; static final String ALARM_SERVICE; }### Answer:
@Test public void testCoreExecution() throws SchedulerException, InterruptedException { SchedulerFactory sf = new StdSchedulerFactory(); Scheduler scheduler = sf.getScheduler(); scheduler.start(); JobDetail job = JobBuilder.newJob(TestJob.class).withIdentity("random", "group").build(); scheduler.scheduleJob(job, getPastPerSecondsTrigger()); Thread.sleep(2000); Assert.assertEquals(counter, 10); scheduler.deleteJob(job.getKey()); }