TimeStampProvider { public long[] timestampsForNextInterval() { return timestampsForInterval(sendInterval); } TimeStampProvider(long startTime, int timeStep, int sendInterval); long next(); long[] timestampsForNextInterval();  }
@Test public void testReturnTstampsForSendInterval() throws Exception { long startTime = 0; int collectInterval = 5; int sendInterval = 30; TimeStampProvider tsp = new TimeStampProvider(startTime, collectInterval, sendInterval); long[] timestamps = tsp.timestampsForNextInterval(); assertThat(timestamps) .hasSize(6) .containsOnly(0, 5, 10, 15, 20, 25); }