Java8RandomShortApi { public static ZonedDateTime zonedDateTime() { return new RandomDate().zonedDateTime(); }  static Instant instant(); static List<Instant> instants(int n); static LocalDateTime localDateTime(); static List<LocalDateTime> localDateTimes(int nOfTimes); static ZonedDateTime zonedDateTime(); static List<ZonedDateTime> zonedDateTimes(int nOfTimes); static OffsetDateTime offsetDateTime(); static List<OffsetDateTime> offsetDateTimes(int nOfTimes); static LocalDate localDate(); static List<LocalDate> localDates(int nOfTimes);  }
@Test void generatesTemporalsBetweenStrings() { String from = "2007-12-03T10:15:30+01:00[Europe/Paris]"; String to = "2007-12-10T00:15:30+01:00[Europe/Paris]"; assertThat(between(from, to).zonedDateTime(), greaterThanOrEqualTo(toZoned(from))); assertThat(between(from, to).zonedDateTime(), lessThanOrEqualTo(toZoned(to))); }