### Question:
ComponentHibernateDao extends GenericDao<Component> implements ComponentDao { @Override public List<Component> getAll() { Query query = session().getNamedQuery("allComponents"); @SuppressWarnings("unchecked") List<Component> result = query.list(); return result; } 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 testGetAll() { givenTwoComponents(); List<Component> cList = dao.getAll(); assertEquals(cList.size(), 2); }