### Question:
JdbcDelegate implements DatabaseDelegate { public boolean deleteJob(String jobid, String nodeId) throws DatabaseException { if (__log.isDebugEnabled()) __log.debug("deleteJob " + jobid + " on node " + nodeId); Connection con = null; PreparedStatement ps = null; try { con = getConnection(); ps = con.prepareStatement(DELETE_JOB); ps.setString(1, jobid); ps.setString(2, nodeId); return ps.executeUpdate() == 1; } catch (SQLException se) { throw new DatabaseException(se); } finally { close(ps); close(con); } } JdbcDelegate(DataSource ds); boolean deleteJob(String jobid, String nodeId); List<String> getNodeIds(); boolean insertJob(Job job, String nodeId, boolean loaded); boolean updateJob(Job job); @SuppressWarnings("unchecked") List<Job> dequeueImmediate(String nodeId, long maxtime, int maxjobs); int updateReassign(String oldnode, String newnode); int updateAssignToNode(String node, int i, int numNodes, long maxtime); void acquireTransactionLocks(); void deleteAllJobs();  }### Answer:
@Test public void testDeleteJob() throws Exception { _del.insertJob(new Job(100L,"j1",true,new Scheduler.JobDetails()), "n1", false); _del.insertJob(new Job(200L,"j2",true,new Scheduler.JobDetails()), "n2", false); assertFalse(_del.deleteJob("j1x", "n1")); assertEquals(2,_del.getNodeIds().size()); assertFalse(_del.deleteJob("j1", "n1x")); assertEquals(2,_del.getNodeIds().size()); assertTrue(_del.deleteJob("j1", "n1")); assertEquals(1,_del.getNodeIds().size()); }