Remove public visibility of JUnit 5 tests

MSAL

Remove public and optionally protected modifiers from methods with @Test, @ParameterizedTest, @RepeatedTest, @TestFactory, @BeforeEach, @AfterEach, @BeforeAll, or @AfterAll. They no longer have to be public visibility to be usable by JUnit 5.

org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic

Optional

removeProtectedModifiersBoolean

Also remove protected modifiers from test methods

mod run . --recipe=org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic

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