Replace MockitoTestExecutionListener with the equivalent Mockito test initialization

MSAL

Replace @TestExecutionListeners(MockitoTestExecutionListener.class) with the appropriate Mockito initialization for the test framework in use: @ExtendWith(MockitoExtension.class) for JUnit 5, @RunWith(MockitoJUnitRunner.class) for JUnit 4, or MockitoAnnotations.openMocks(this) for TestNG.

org.openrewrite.java.testing.mockito.ReplaceMockitoTestExecutionListener

Optional

The test framework to use when imports alone cannot determine the framework. Typically set by wrapper recipes that check project dependencies.

mod run . --recipe=org.openrewrite.java.testing.mockito.ReplaceMockitoTestExecutionListener

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