@Test public void getCorrectNextTimestampWhenMultipleCandidates() { for (long timestamp = 1000L; tsPartitionFine(timestamp) < 10L; timestamp += TS_FINE_GRANULARITY / 5) { writeToDefaultCellCommitted(sweepableTimestamps, timestamp, TABLE_CONS); } assertThat(readConservative(shardCons)).contains(tsPartitionFine(1000L)); progress.updateLastSweptTimestamp(conservative(shardCons), 2L * TS_FINE_GRANULARITY); assertThat(readConservative(shardCons)).contains(tsPartitionFine(2L * TS_FINE_GRANULARITY + 1000L)); setSweepTimestampAndGet(4 * TS_FINE_GRANULARITY); assertThat(readConservative(shardCons)).contains(tsPartitionFine(2L * TS_FINE_GRANULARITY + 1000L)); }