### Question:
JobUtils { public static JobDetail createJob(JobRequest jobRequest, Class<? extends Job> jobClass, ApplicationContext context) { JobDetailFactoryBean factoryBean = new JobDetailFactoryBean(); factoryBean.setJobClass(jobClass); factoryBean.setDurability(false); factoryBean.setApplicationContext(context); factoryBean.setName(jobRequest.getJobName()); factoryBean.setGroup(jobRequest.getGroupName()); if (jobRequest.getJobDataMap() != null) { factoryBean.setJobDataMap(jobRequest.getJobDataMap()); } factoryBean.afterPropertiesSet(); return factoryBean.getObject(); } private  JobUtils(); static JobDetail createJob(JobRequest jobRequest, Class<? extends Job> jobClass, ApplicationContext context); static Trigger createTrigger(JobRequest jobRequest);  }### Answer:
@Test public void buildJobDetail_withJobDataMap() { JobDataMap jobDataMap = new JobDataMap(); jobDataMap.put("jobId", "123"); JobRequest jobRequest = new JobRequest(); jobRequest.setJobName(JOB_NAME); jobRequest.setGroupName(GROUP_NAME); jobRequest.setStartDateAt(LocalDateTime.now()); jobRequest.setJobDataMap(jobDataMap); JobDetail jobDetail = JobUtils.createJob(jobRequest, SimpleJob.class, null); assertThat(jobDetail.getKey().getName()).isEqualTo(JOB_NAME); assertThat(jobDetail.getJobDataMap().get("jobId")).isEqualTo("123"); }