JUnit 4 ExpectedException to JUnit Jupiter's assertThrows()

MSAL

Replace usages of JUnit 4's @Rule ExpectedException with JUnit 5's Assertions.assertThrows().

org.openrewrite.java.testing.junit5.ExpectedExceptionToAssertThrows
mod run . --recipe=org.openrewrite.java.testing.junit5.ExpectedExceptionToAssertThrows

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.