}
public void testGetByKey() throws Exception {
time = new Date(System.currentTimeMillis());
period = new Long(1000);
WorkInfo workInfo1 = new WorkInfo(key, new Long(1), userInfo, time, period, true);
WorkInfo workInfo2 = new WorkInfo(key, new Long(2), userInfo, time, period, true);
jdbcWorkerPersistence.save(workInfo1);
jdbcWorkerPersistence.save(workInfo2);
Collection idsAll = jdbcWorkerPersistence.getIdsByKey(key, null);
assertEquals(2, idsAll.size());
Collection ids1 = jdbcWorkerPersistence.getIdsByKey(key, new Long(1));