service tests added, safe criteria used in dao instead of raw hql