### Question:
PropertyHibernateDao extends GenericDao<Property> implements PropertyDao { @Override public Property getByName(String name) { return (Property) session() .getNamedQuery("getPropertyByName") .setString("name", name) .uniqueResult(); } PropertyHibernateDao(SessionFactory sessionFactory); @Override void saveOrUpdate(Property entity); @Override Property getByName(String name);  }### Answer:
@Test public void testGetByName() { session.save(property); Property result = propertyDao.getByName(PROPERTY_NAME); assertNotNull(result, "Property is not found by name."); assertEquals(result.getId(), property.getId(), "Property not found"); }