### Question:
BranchHibernateDao extends GenericDao<PoulpeBranch> implements BranchDao { @Override @SuppressWarnings("unchecked") public List<PoulpeBranch> getAll() { return session().createQuery("from PoulpeBranch").list(); } BranchHibernateDao(SessionFactory sessionFactory); @Override @SuppressWarnings("unchecked") List<PoulpeBranch> getAll();  }### Answer:
@Test public void testGetAll() { givenTwoBranches(); List<PoulpeBranch> branches = dao.getAll(); assertEquals(branches.size(), 2); }
@Test public void testGetAllWithEmptyTable() { List<PoulpeBranch> branches = dao.getAll(); assertTrue(branches.isEmpty()); }