JobService { public boolean delete(String id) throws Exception { LOG.info("delete jobs by id {}", id); try (SqlSession sqlSession = MyBatisUtil.getSqlSession()) { JobMapper jobMapper = sqlSession.getMapper(JobMapper.class); jobMapper.deleteByPrimaryKey(id); sqlSession.commit(); } catch (Exception e) { LOG.error(e.getMessage(), e); throw new Exception(e); } return true; }  List<Job> queryJobList(String userName,
      String column, String order, int pageNo, int pageSize); Job selectByJobId(String jobId); Job selectById(String id); boolean add(Job job); boolean updateByPrimaryKeySelective(Job job); boolean delete(String id); boolean deleteByJobId(String jobId);  }
@Test public void delete() throws Exception { Job job = new Job(); job.setJobId("9e93caeb-8a08-4278-a10a-ff60d5835716"); job.setJobName("mnist"); job.setJobNamespace("submarine"); job.setUserName("JobServiceTest-UserName"); job.setJobType("TFJob"); job.setJobStatus("Finished"); job.setJobFinalStatus("Succeeded"); job.setCreateBy("JobServiceTest-UserName"); Boolean ret = jobService.add(job); assertTrue(ret); Boolean deleteRet = jobService.delete(job.getId()); assertTrue(deleteRet); }