### Question:
BaseDao extends HibernateDaoSupport implements IBaseDao { @Override public Iterator<?> iterate(String hql) { return this.getHibernateTemplate().iterate(hql); }  @Autowired void setSuperSessionFactory(SessionFactory sessionFactory); @Override void saveOrUpdate(Object entity); @Override void save(Object entity); @Override void saveOrUpdate(Collection<?> co); @Override void update(Object entity); @Override void update(String hql); @Override void delete(Object entity); @Override void delete(String hql); @Override void deleteAll(Collection<?> collectionEntities); @Override void refresh(Object obj); @Override Object load(Class<?> clazz, Serializable id); @Override List<?> loadAll(Class<?> entityClass); @Override Object get(Class<?> clazz, Serializable id); @Override Object loadNotLazy(Class<?> clazz, Serializable id); @Override Iterator<?> iterate(String hql); @Override @SuppressWarnings("unchecked") X queryUniqueObject(String hql, Class<X> clazz); @Override List<?> query(String hql); @Override List<?> query(String hql, Object[] args, Type[] types); @Override List<?> query(String hql, Integer maxSize); @Override List<?> queryByNamedParam(String hql, String[] args, Object[] values); @Override List<?> findBySql(String sql, Object[] args, Type[] types); @Override List<?> findBySql(String sql, int count); @Override List<?> findBySql(String sql); @Override List<?> findBySql(String sql, Class<?> persistentClass, int count); @Override void clear(); @Override void evict(Object entity); @Override void flush(); @Override void evictSecondLevelCache(Class<?> persistentClass); @Override DataBaseType getDataBaseType();  }### Answer:
@Test public void testIterate() { String queryHql = "from TTestUser"; Iterator<TTestUser> iter = (Iterator<TTestUser>) baseDao.iterate(queryHql); while (iter.hasNext()) { TTestUser testUser = iter.next(); assertNotNull("iterate方法加载对象，会级联查询，不延迟加载！", testUser); } assertSame("iterate错误！", getUserMap().size(), baseDao.loadAll(TTestUser.class).size()); }