MessageSummaryDAOImpl extends AbstractIdleService implements IMessageSummaryDAO { @Override public int getTotalMessageSummariesForType(MessageType type, Interval interval, List<String> roomNames, List<String> usernames, boolean withBots) { return occurrenceStatsDAO.getTotalMentionsForType(type, interval, roomNames, usernames, withBots); } MessageSummaryDAOImpl(EntityManagerFactory emf); @Override void persistMessageSummary(MessageSummary messageSummary); @Override MessageSummary getMessageSummary(MessageSummary messageSummary); @Override List<MessageSummary> getAllMessageSummariesForType(MessageType type,
                                                              Interval interval,
                                                              List<String> roomNames,
                                                              List<String> usernames); @Override List<MessageSummary> getAllMessageSummaries(Interval interval,
                                                       List<String> roomNames,
                                                       List<String> usernames,
                                                       boolean withBots); @Override int getTotalMessageSummaries(Interval interval, List<String> roomNames,
                                        List<String> usernames, boolean withBots); @Override int getTotalMessageSummariesForType(MessageType type,
                                               Interval interval,
                                               List<String> roomNames,
                                               List<String> usernames,
                                               boolean withBots); @Override Map<String, Double> getActiveUsersByMethod(Interval interval,
                                                      ActiveMethod method,
                                                      int resultSize,
                                                      boolean withBots); @Override Map<String, Double> getActiveRoomsByMethod(Interval interval,
                                                      ActiveMethod method,
                                                      int resultSize,
                                                      boolean withBots);  }
@Test public void testGetTotalMessageSummariesForType_withValue() { Interval interval = new Interval(mentionDate.minusDays(1), mentionDate.plusDays(1)); int result = underTest.getTotalMessageSummariesForType(MessageType.MESSAGE, interval, ImmutableList.of(), ImmutableList.of(), true); assertEquals(2, result); }