CassandraUtil { static List<LocalDate> getDays(long endTs, @Nullable Long lookback) { List<LocalDate> result = new ArrayList<>(); for (long epochMillis : DateUtil.epochDays(endTs, lookback)) { result.add(LocalDate.fromMillisSinceEpoch(epochMillis)); } return result; }  static int durationIndexBucket(long ts_micro);  }
@Test public void getDays_consistentWithDateUtil() { assertThat(CassandraUtil.getDays(DAYS.toMillis(2), DAYS.toMillis(1))) .extracting(LocalDate::getMillisSinceEpoch) .containsExactlyElementsOf(DateUtil.epochDays(DAYS.toMillis(2), DAYS.toMillis(1))); }