### Question:
JobPicker { void deleteExpiredLocks() { int numberOfRowsDeleted = template.update( DELETE_EXPIRED_LOCKS ); logger.info( "Number of Locks Deleted = " + numberOfRowsDeleted ); }  boolean lockObj( JobDefinition jd, String clusterID, String threadID ); void unlockWorker( String clusterID, String threadID ); boolean extendLock( JobDefinition jd, String clusterID, String workerID ); static final String FIND_UNLOCKED_JOB_QUERY; static final String FIND_UNLOCKED_STATS_JOB_QUERY; }### Answer:
@Test @Transactional public void testDeleteExpiredLock() throws IOException { String sql = new String(Files.readAllBytes(Paths.get("src/test/resources/dbunit/object_lock_dataset.sql"))); template.update(sql); assertEquals(3, template.queryForList("select * from METASTOR_OBJECT_LOCKS").size()); jp.deleteExpiredLocks(); assertEquals(2, template.queryForList("select * from METASTOR_OBJECT_LOCKS").size()); }