AssignmentConfigDaoImpl implements AssignmentConfigDao { @Override public List<AssignmentConfig> getAll() { return getSession().createCriteria(AssignmentConfig.class).list(); }  @Autowired @Qualifier("assignmentSessionFactory") void setSessionFactory(SessionFactory sessionFactory); @Override List<AssignmentConfig> getAll(); @Override @Transactional(readOnly = true) AssignmentConfig getAssignmentConfig(String key); @Override @Transactional(rollbackFor = Throwable.class) void save(AssignmentConfig assignmentConfig); @Override @Transactional(rollbackFor = Throwable.class) void saveAll(List<AssignmentConfig> assignmentConfigList); @Override @Transactional(rollbackFor = Throwable.class) void delete(AssignmentConfig assignmentConfig); @Override @Transactional(rollbackFor = Throwable.class) void deleteAll();  }
@Test @Transactional public void getAllTest() { Date date = new Date(); List<AssignmentConfig> assignmentConfigList = _dao.getAll(); assertEquals(0, assignmentConfigList.size()); AssignmentConfig assignmentConfig = new AssignmentConfig("lastUpdatedTest", getDateAsString(date)); _dao.save(assignmentConfig); assignmentConfigList = _dao.getAll(); assertEquals(1, assignmentConfigList.size()); AssignmentConfig retrievedAssignmentConfig = assignmentConfigList.get(0); assertEquals(getDateAsString(date), retrievedAssignmentConfig.getValue()); }