Remove JUnit 4 @RunWith annotations that do not require an @ExtendWith replacement

MSAL

Some JUnit 4 @RunWith annotations do not require replacement with an equivalent JUnit Jupiter @ExtendWith annotation. This can be used to remove those runners that either do not have a JUnit Jupiter equivalent or do not require a replacement as part of JUnit 4 to 5 migration.

org.openrewrite.java.testing.junit5.RemoveObsoleteRunners

Required

The fully qualified class names of the JUnit 4 runners to be removed. Separate values with commas.

mod run . --recipe=org.openrewrite.java.testing.junit5.RemoveObsoleteRunners \ -P obsoleteRunners=org.junit.runners.JUnit4

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