@Test
public void calculateIndexOfTick() {

    SlidingTimeWindowMovingAverages stwm = new SlidingTimeWindowMovingAverages(clock);
    assertThat(stwm.calculateIndexOfTick(Instant.ofEpochSecond(0L)), is(0));
    assertThat(stwm.calculateIndexOfTick(Instant.ofEpochSecond(1L)), is(1));
}