MasterSlaveJobServiceImpl extends AbstractService implements MasterSlaveJobService, ApplicationContextAware { @Override public MasterSlaveJob getJob(String group, String name, String jarFileName) { MasterSlaveJob param = new MasterSlaveJob(); param.setGroupName(group); param.setJobName(name); param.setJarFileName(jarFileName); return baseDao.getUnique(MasterSlaveJob.class, param); }  @Override void setApplicationContext(ApplicationContext applicationContext); @Override List<MasterSlaveJob> getAllJobs(); @Override MasterSlaveJob getJob(String group, String name, String jarFileName); @Override void saveJob(String jarFilePath, String packagesToScan); @Override List<String> getJarFileNameList(String group, String name);  }
@Test public void getJob() { masterSlaveJobService.saveJob(getSampleJarFile(), "com.zuoxiaolong"); MasterSlaveJob job = masterSlaveJobService.getJob("com.zuoxiaolong.niubi.job.sample.spring.job.Job1", "test", "niubi-job-sample-spring.jar"); Assert.assertNotNull(job); }