--

This is imprecise. `expected` is still available in `org.junit.Test`, but it never existed anywhere in `org.junit.jupiter`. Though it's a bad idea, you can mix JUnit 4 and JUnit 5. Of course it's better to use something like `assertThrows( )` if you have JUnit 5.

--

--

Alonso Del Arte
Alonso Del Arte

Written by Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified

No responses yet