### Question:
ServiceDao extends BaseDao<Service> implements ServiceStore { public List<Service> findServiceByGroups() { Criteria criteria = currentSession().createCriteria(Service.class); criteria.setProjection( Projections.projectionList() .add(Projections.property("group"), "group") .add(Projections.groupProperty("group"))) .setResultTransformer(Transformers.aliasToBean(Service.class)); return list(criteria); } @Inject  ServiceDao(SessionFactory sessionFactory); Optional<Service> findByCode(String code); Service findByPathAndMethod(String path, Service.Method method); List<Service> findServiceByGroups(); List<Service> findServiceByGroup(String group);  }### Answer:
@Test public void findServiceByGroups() { List<Service> services = dao.findServiceByGroups(); Assert.assertTrue(services.size() > 0); }