With Java 17, the reflective access is restricted. So, current version of Mockito with JUnit4 was not able to mock static classes or methods. For now, commenting those tests. However, based on further research, in order to resolve it, we can add explicit access by passing --add-opens parameter to scope test. However, when I tested Mockito with JUnit5 it seems to work without those parameters. So, will be checking further on this to bring the tests back without having to pass in those parameters. Worst case, will add the tests back with the parameters passed. Just wanted avoid these for security reasons if possible.
Information
https://docs.oracle.com/en/java/javase/17/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-12F945EB-71D6-46AF-8C3D-D354FD0B1781
Associated JIRA Tickets
Maven Install Status
Checklist
mvn clean verify
).README.md
, etc.) depending if the changes require it.