### Question:
ExternalLinkHibernateDao extends GenericDao<ExternalLink> implements ExternalLinkDao { @Override public List<ExternalLink> getAll() { return session().createQuery("from ExternalLink").setCacheable(true).list(); } ExternalLinkHibernateDao(SessionFactory sessionFactory); @Override List<ExternalLink> getAll();  }### Answer:
@Test public void testGetLinks() throws Exception { List<ExternalLink> link = ObjectsFactory.getExternalLinks(3); for (ExternalLink externalLink : link) { session.saveOrUpdate(externalLink); } session.clear(); List<ExternalLink> actual = dao.getAll(); assertReflectionEquals(link.get(0), actual.get(0)); assertEquals(actual.size(), 3); }