### Question:
YearMonthRangeRandomizer extends AbstractRangeRandomizer<YearMonth> { @Override public YearMonth getRandomValue() { long minYear = min.getLong(ChronoField.YEAR); long maxYear = max.getLong(ChronoField.YEAR); long randomYear = (long) nextDouble(minYear, maxYear); long minMonth = min.getLong(ChronoField.MONTH_OF_YEAR); long maxMonth = max.getLong(ChronoField.MONTH_OF_YEAR); long randomMonth = (long) nextDouble(minMonth, maxMonth); return YearMonth.of(Math.toIntExact(randomYear), Math.toIntExact(randomMonth)); } YearMonthRangeRandomizer(final YearMonth min, final YearMonth max);  YearMonthRangeRandomizer(final YearMonth min, final YearMonth max, final long seed); static YearMonthRangeRandomizer aNewYearMonthRangeRandomizer(final YearMonth min, final YearMonth max); static YearMonthRangeRandomizer aNewYearMonthRangeRandomizer(final YearMonth min, final YearMonth max, final long seed); @Override YearMonth getRandomValue();  }### Answer:
@Test void generatedYearMonthShouldNotBeNull() { assertThat(randomizer.getRandomValue()).isNotNull(); }
@Test void generatedYearMonthShouldBeWithinSpecifiedRange() { assertThat(randomizer.getRandomValue()).isBetween(minYearMonth, maxYearMonth); }