Replace PowerMock Whitebox.invokeConstructor() with Java reflection

MSAL

Replace Whitebox.invokeConstructor(..) with java.lang.reflect.Constructor lookup and newInstance() on the named class. Constructor parameter types are taken from the unambiguously resolved constructor, falling back to each argument's compile-time class; arrays passed to the Object... varargs overload are left unchanged for manual migration.

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

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