### Question:
ForumStatisticsHibernateDao implements ForumStatisticsDao { @Override public int getPostsOnForumCount() { return ((Number) sessionFactory.getCurrentSession() .createQuery("select count(*) from Post p") .setCacheable(true) .uniqueResult()) .intValue(); } ForumStatisticsHibernateDao(SessionFactory sessionFactory); @Override int getPostsOnForumCount(); @Override int getUsersCount();  }### Answer:
@Test public void testGetPostsOnForumCount() { int postCount = 5; PersistedObjectsFactory.createAndSavePostList(postCount); int result = dao.getPostsOnForumCount(); assertEquals(result, postCount); }