Replace PowerMock Whitebox.getMethod() with Java reflection

MSAL

Replace Whitebox.getMethod(Class, String, Class...) with Class.getDeclaredMethod(String, Class...) plus setAccessible(true). Unlike PowerMock, getDeclaredMethod does not traverse the class hierarchy; calls passing an explicit Class[] array are left unchanged for manual migration.

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

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