SessionRegistry sessionRegistry = mock(SessionRegistry.class);
users = Collections.nCopies(userCount , (Object) new JCUser("","",""));
when(sessionRegistry.getAllPrincipals()).thenReturn(users);
SessionStatisticListener listener = mock(SessionStatisticListener.class);
when(listener.getTotalActiveSessions()).thenReturn(sessionCount);
forumStaticsProvider = new ForumStatisticsProvider(sessionRegistry, listener, statisticsService);
}