### Question:
ForumStatisticsHibernateDao implements ForumStatisticsDao { @Override public int getUsersCount() { return ((Number) sessionFactory .getCurrentSession().getNamedQuery("getCountOfUsers") .setCacheable(true) .uniqueResult()) .intValue(); } ForumStatisticsHibernateDao(SessionFactory sessionFactory); @Override int getPostsOnForumCount(); @Override int getUsersCount();  }### Answer:
@Test public void testGetUserCount() { session.save(ObjectsFactory.getUser("firstUser", "firstUserMail@mail.ru")); assertEquals(1, dao.getUsersCount()); }
@Test public void testGetUserCountNoUsers() { assertEquals(0, dao.getUsersCount()); }