### Question:
ComponentHibernateDao extends GenericDao<Component> implements ComponentDao { @Override public ComponentBase getBaseComponent(ComponentType componentType) { Query query = session().getNamedQuery("findBaseComponentByComponentType"); query.setParameter("componentType", componentType); return (ComponentBase) query.uniqueResult(); } ComponentHibernateDao(SessionFactory sessionFactory); @Override List<Component> getAll(); @Override Set<ComponentType> getAvailableTypes(); @Override Component getByType(ComponentType componentType); @Override ComponentBase getBaseComponent(ComponentType componentType);  }### Answer:
@Test public void getBaseComponent() { ComponentBase expected = givenBaseComponent(); ComponentBase actual = dao.getBaseComponent(ComponentType.FORUM); assertReflectionEquals(expected, actual); }