Replace PowerMock Whitebox.getField() with Java reflection

MSAL

Replace Whitebox.getField(Class, String) with Class.getDeclaredField(String) plus setAccessible(true). Unlike PowerMock, getDeclaredField does not traverse the class hierarchy for fields inherited from a superclass.

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

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