### Question:
ServiceDao extends BaseDao<Service> implements ServiceStore { public List<Service> findServiceByGroup(String group) { Criteria criteria = currentSession().createCriteria(Service.class); criteria.add(Restrictions.eq("group", group)); 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 findServiceByGroup() { super.createFrom(); List<Service> services = dao.findServiceByGroup("ROBE"); Assert.assertTrue(services.size() == 1); Service service = services.get(0); Assert.assertEquals(service.getGroup(), "ROBE"); super.deleteFrom(service); }