StandbyJobLogServiceImpl extends AbstractService implements StandbyJobLogService { @Override public List<StandbyJobLog> getAllJobLogs() { return baseDao.getAll(StandbyJobLog.class); }  @Override List<StandbyJobLog> getAllJobLogs(); @Override String saveJobLog(StandbyJobSummary standbyJobSummary); @Override void updateJobLog(StandbyJobData.Data data);  }
@Test public void getAllJobLogs() { List<StandbyJobLog> jobLogs = standbyJobLogService.getAllJobLogs(); Assert.assertNotNull(jobLogs); Assert.assertTrue(jobLogs.size() == 0); StandbyJobSummary jobSummary = new StandbyJobSummary(); jobSummary.setJarFileName("1.jar"); jobSummary.setJobName("Job1"); jobSummary.setPackagesToScan("com.zuoxiaolong"); jobSummary.setGroupName("com.zuoxiaolong.job"); jobSummary.setContainerType("Common"); jobSummary.setJobCron("0 * * * * ?"); jobSummary.setJobOperation("Start"); jobSummary.setJobState("Startup"); jobSummary.setMisfirePolicy("None"); jobSummary.setOriginalJarFileName("1.jar"); standbyJobLogService.saveJobLog(jobSummary); jobLogs = standbyJobLogService.getAllJobLogs(); Assert.assertNotNull(jobLogs); Assert.assertTrue(jobLogs.size() == 1); StandbyJobLog jobLog = jobLogs.get(0); Assert.assertEquals(jobLog.getJarFileName(), "1.jar"); Assert.assertEquals(jobLog.getJobName(), "Job1"); Assert.assertEquals(jobLog.getJobOperation(), "Start"); Assert.assertEquals(jobLog.getMisfirePolicy(), "None"); Assert.assertEquals(jobLog.getOriginalJarFileName(), "1.jar"); Assert.assertEquals(jobLog.getJobCron(), "0 * * * * ?"); Assert.assertEquals(jobLog.getContainerType(), "Common"); Assert.assertEquals(jobLog.getGroupName(), "com.zuoxiaolong.job"); }