### Question:
ServiceDao extends BaseDao<Service> implements ServiceStore { public Service findByPathAndMethod(String path, Service.Method method) { Criteria criteria = currentSession().createCriteria(Service.class); criteria.add(Restrictions.eq("path", path)); criteria.add(Restrictions.eq("method", method)); return uniqueResult(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 findByPathAndMethod() { super.createFrom(); Service service = dao.findByPathAndMethod("robe", ServiceEntry.Method.GET); Assert.assertTrue(service != null); Assert.assertEquals(service.getPath(), "robe"); Assert.assertEquals(service.getGroup(), "ROBE"); super.deleteFrom(service); }