@Test
public void testFindNearestSuccessorForTimestampWithStartTimestampGreaterThanLastTimestampInChronology() {

    Set<Timestamp> timestamps = new LinkedHashSet<Timestamp>();
    timestamps.add(Timestamp.fromMicros(1000L));
    for (int i = 0; i < Random.getScaleCount(); i++) {
        long increment = 0;
        while (increment == 0) {
            increment = Math.abs(Random.getScaleCount());
        }
        timestamps.add(Timestamp.fromMicros(
                Iterables.getLast(timestamps).getMicros() + increment));
    }
    Timestamp startTimestamp = Timestamp
            .fromMicros(Iterables.getLast(timestamps).getMicros() + 1000L);
    Assert.assertEquals(timestamps.size(), Timestamps
            .findNearestSuccessorForTimestamp(timestamps, startTimestamp));
}