### Question:
ComponentHibernateDao extends GenericDao<Component> implements ComponentDao { @Override public Component getComponent() { return (Component) session().getNamedQuery("getForumComponent").uniqueResult(); } ComponentHibernateDao(SessionFactory sessionFactory); @Override Component getComponent();  }### Answer:
@Test public void testGetComponent() { session.save(cmp); Component result = componentDao.getComponent(); assertNotNull(result, "Property is not found by name."); assertEquals(result.getId(), cmp.getId(), "Property not found"); }