JSONExtractor { LocalDate getLastDayOfMonth(String dateTime) { return LocalDate.parse(dateTime).plusMonths(1).withDayOfMonth(DAY_OF_MONTH).minusDays(1); }  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);  }
@Test public void lastDayOfMonth() { Assert.assertThat(jsonExtractor.getLastDayOfMonth("2014-03-12").toString(), is("2014-03-31")); Assert.assertThat(jsonExtractor.getLastDayOfMonth("2019-03-12").toString(), is("2019-03-31")); Assert.assertThat(jsonExtractor.getLastDayOfMonth("2020-12-12").toString(), is("2020-12-31")); Assert.assertThat(jsonExtractor.getLastDayOfMonth("2021-10-12").toString(), is("2021-10-31")); }