code: public static Year randomYear(int startInclusive, int endExclusive) {
      checkArgument(startInclusive < MAX_YEAR, "Start must be before %s", MAX_YEAR);
      checkArgument(startInclusive >= MIN_YEAR, "Start must be on or after %s", MIN_YEAR);
      checkArgument(endExclusive > MIN_YEAR, "End must be after %s", MIN_YEAR);
      checkArgument(endExclusive <= MAX_YEAR, "End must be on or before %s", MAX_YEAR);
      checkArgument(startInclusive <= endExclusive, "End must be on or after start");
      return Year.of(RandomUtils.nextInt(startInclusive, endExclusive));
    }
docs: Returns a random {@link Year} within the specified range.
  
  @param startInclusive the earliest {@link Year} that can be returned
  @param endExclusive the upper bound (not included)
  @return the random {@link Year}
  @throws IllegalArgumentException if endExclusive is earlier than startInclusive, if end is
  before {@link RandomDateUtils#MIN_INSTANT}, or if start is after {@link
  RandomDateUtils#MAX_INSTANT}