System.arraycopy(config, 0, configs, 1, config.length);
configs[0] = DataSourceConfiguration.class;
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(configs);
Job job = jobName == null ? context.getBean(Job.class) : context.getBean(JobLocator.class).getJob(jobName);
JobLauncher jobLauncher = context.getBean(JobLauncher.class);
execution = jobLauncher
.run(job, new JobParametersBuilder().addLong("run.id", (long) (Math.random() * Long.MAX_VALUE))
.toJobParameters());
assertEquals(status, execution.getStatus());
assertEquals(stepExecutionCount, execution.getStepExecutions().size());
JobExplorer jobExplorer = context.getBean(JobExplorer.class);