Kotlin, Kotest, Property Based Testing.
shouldBe "Date '2020-01-01' must be within '2022-01-01' and '2022-12-31'." } @Test fun `throws exception if date is above maxDate`() { // given val inputDto = createValidInputDto().copy( date = LocalDate.of(2025, 1, 1), ) // when + then val exception = shouldThrow<IllegalArgumentException> {