Replace PowerMock Whitebox.getMethod() with Java reflection
MSALReplace 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. PowerMockWhiteboxGetMethodToJavaReflectionmod run . --recipe= org. openrewrite. java. testing. mockito. PowerMockWhiteboxGetMethodToJavaReflectionInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.