Replace MockRepository.removeClassMethodInvocationControl() with closing the static mock

MSAL

Replaces MockRepository.removeClassMethodInvocationControl(Type.class), which ends the static mocking of Type that PowerMockito.mockStatic(Type.class) started, with closing the MockedStatic that PowerMockitoMockStaticToMockito assigns to a field in its place. Where the class holds no MockedStatic for the type, the call is left as it is.

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

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