MasterSlaveJobServiceImpl extends AbstractService implements MasterSlaveJobService, ApplicationContextAware { @Override public List<MasterSlaveJob> getAllJobs() { return baseDao.getAll(MasterSlaveJob.class); }  @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 getAllJobs() { List<MasterSlaveJob> jobs = masterSlaveJobService.getAllJobs(); Assert.assertNotNull(jobs); Assert.assertTrue(jobs.size() == 0); masterSlaveJobService.saveJob(getSampleJarFile(), "com.zuoxiaolong"); jobs = masterSlaveJobService.getAllJobs(); Assert.assertNotNull(jobs); Assert.assertTrue(jobs.size() == 2); }