Add @MockitoSettings(strictness = Strictness.WARN) to @ExtendWith(MockitoExtension.class) classes

MSAL

Adds @MockitoSettings(strictness = Strictness.WARN) to test classes that have @ExtendWith(MockitoExtension.class) but do not already have a @MockitoSettings annotation. This preserves the lenient stubbing behavior from Mockito 1.x/2.x migrations and prevents UnnecessaryStubbingException from strict stubbing defaults.

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

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