On Mon, 17 Apr 2023 17:04:32 GMT, Alan Bateman <al...@openjdk.org> wrote:
> What you have is fine, I'm just making the point that the exception message > is somewhat secondary I guess this is also a question of testing the interface vs. testing the implementation. To get good coverage of validation scenarios, I often find it quite useful to test on the actual message. This makes the test overspecific to the interface, but it helps make sure that each error condition is covered independently. Without asserting on the actual message, it can be hard to know if you are being shadowed by another higher level error condition. I've seen this a lot when adding test coverage for various ZIP processing code. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13482#discussion_r1169058586