@@ -30,7 +30,7 @@ void validateDuration_withZeroDuration_shouldThrow() {
3030 IllegalArgumentException .class ,
3131 () -> ParameterValidator .validateDuration (Duration .ofSeconds (0 ), "testParam" ));
3232
33- assertEquals ("testParam must be at least 1 second, got: 0 seconds " , exception .getMessage ());
33+ assertEquals ("testParam must be at least 1 second, got: PT0S " , exception .getMessage ());
3434 }
3535
3636 @ Test
@@ -39,7 +39,7 @@ void validateDuration_withSubSecondDuration_shouldThrow() {
3939 IllegalArgumentException .class ,
4040 () -> ParameterValidator .validateDuration (Duration .ofMillis (500 ), "testParam" ));
4141
42- assertEquals ("testParam must be at least 1 second, got: 0 seconds " , exception .getMessage ());
42+ assertEquals ("testParam must be at least 1 second, got: PT0.5S " , exception .getMessage ());
4343 }
4444
4545 @ Test
@@ -48,7 +48,7 @@ void validateDuration_withNegativeDuration_shouldThrow() {
4848 IllegalArgumentException .class ,
4949 () -> ParameterValidator .validateDuration (Duration .ofSeconds (-5 ), "testParam" ));
5050
51- assertEquals ("testParam must be at least 1 second, got: -5 seconds " , exception .getMessage ());
51+ assertEquals ("testParam must be at least 1 second, got: PT-5S " , exception .getMessage ());
5252 }
5353
5454 @ Test
@@ -68,7 +68,7 @@ void validateOptionalDuration_withInvalidDuration_shouldThrow() {
6868 IllegalArgumentException .class ,
6969 () -> ParameterValidator .validateOptionalDuration (Duration .ofMillis (999 ), "testParam" ));
7070
71- assertEquals ("testParam must be at least 1 second, got: 0 seconds " , exception .getMessage ());
71+ assertEquals ("testParam must be at least 1 second, got: PT0.999S " , exception .getMessage ());
7272 }
7373
7474 @ Test
0 commit comments