CassandraUtil { public static int durationIndexBucket(long ts_micro) { return (int) (ts_micro / (DURATION_INDEX_BUCKET_WINDOW_SECONDS * 1_000_000)); }  static int durationIndexBucket(long ts_micro);  }
@Test public void durationIndexBucket_notNegative() { assertThat(CassandraUtil.durationIndexBucket(TODAY * 1000L)).isNotNegative(); assertThat(CassandraUtil.durationIndexBucket((TODAY + TimeUnit.DAYS.toMillis(3654)) * 1000L)) .isNotNegative(); }