### Question:
YearRangeRandomizer extends AbstractRangeRandomizer<Year> { @Override public Year getRandomValue() { long minYear = min.getLong(ChronoField.YEAR); long maxYear = max.getLong(ChronoField.YEAR); long randomYear = (long) nextDouble(minYear, maxYear); return Year.of(Math.toIntExact(randomYear)); } YearRangeRandomizer(final Year min, final Year max);  YearRangeRandomizer(final Year min, final Year max, final long seed); static YearRangeRandomizer aNewYearRangeRandomizer(final Year min, final Year max); static YearRangeRandomizer aNewYearRangeRandomizer(final Year min, final Year max, final long seed); @Override Year getRandomValue();  }### Answer:
@Test void generatedYearShouldNotBeNull() { assertThat(randomizer.getRandomValue()).isNotNull(); }
@Test void generatedYearShouldBeWithinSpecifiedRange() { assertThat(randomizer.getRandomValue()).isBetween(minYear, maxYear); }