JSONExtractor { public List<UsageStatistic> getSingleUserUsageBetween(String user, String startDate, String endDate) throws IOException { Predicate<Long> rangePredicate = filterDateIntervals(startDate, endDate); List<UsageStatistic> allStatistics = loadStatisticBetweenDate(startDate, endDate); return getSingleUserRangeStatistic(rangePredicate, user, allStatistics); }  List<UsageStatistic> loadStatisticOf(String date); Map<String, List<UsageStatistic>> getAllUserUsageStatistic(String date); List<UsageStatistic> getUsageStatisticsSince(String startDate); Map<String, List<UsageStatistic>> getAllUserUsageBetween(String startDate, String endDate); Map<String, List<UsageStatistic>> getAllDateUsageBetween(String startDate, String endDate); Map<String, List<UsageStatistic>> getAllQueueUsageBetween(String startDate, String endDate); UsageStatistic getSingleStatistic(String jobId, String date); List<UsageStatistic> getSingleUserStatistic(String userName, String date); List<UsageStatistic> getSingleUserUsageBetween(String user, String startDate, String endDate); List<UsageStatistic> getSingleUserUsageInYear(String user, String year); List<UsageStatistic> getSingleUserUsageInYearMonth(String user, String year, String month); List<UsageStatistic> getSingleUserUsageYearMonthDay(String user, String year, String month,
                                                               String day);  }
@Ignore @Test public void testUserStatisticRange() throws Exception { List<UsageStatistic> usageStatisticList = jsonExtractor.getSingleUserUsageBetween("martin", "2017-01-09", "2017-01-15"); assertEquals(usageStatisticList.size(), 1484); }