RealtimeBarUtil { public static JobDetail buildJob(String jobName, IBarBuilder barBuilder) { JobDataMap jobDataMap = new JobDataMap(); jobDataMap.put(BAR_BUILDER_DATA, barBuilder); return JobBuilder.newJob(BarBuilderJob.class).withIdentity(jobName).usingJobData(jobDataMap).build(); }  static JobDetail buildJob(String jobName, IBarBuilder barBuilder); static Trigger getTrigger(String jobName, int interval, LengthUnit units); static Date getFirstScheduledDate(Date date, int interval); static String getJobName(RealtimeBarRequest realtimeBarRequest); static LocalDateTime getBarDate(); static final String BAR_BUILDER_DATA; }
@Test public void testBuildJob() { String jobName = "myJob"; JobDataMap jobDataMap = new JobDataMap(); jobDataMap.put( RealtimeBarUtil.BAR_BUILDER_DATA, null ); JobDetail expectedJob = JobBuilder.newJob(BarBuilderJob.class).withIdentity(jobName).usingJobData(jobDataMap).build(); assertEquals(expectedJob, RealtimeBarUtil.buildJob(jobName, null)); }