following up https://lwpro2.wordpress.com/2023/05/14/java-8-to-java-17-migration-for-a-large-monolithic/, there are further bugs to fix with the existing implementation with Mockito (somehow the existing codebase used mockito, together with easyMock, PowerMock as well).
The workable versions are :

in addition,
- switching from mockito 1 to 2, it now stops matching
null
withany
. so the solution is to wrap it withnullable
.

2. another breaking change is, mockito 2 doesn’t match array with any
. the solution is to cast with any(Object[].class)

3. Mockito anyCollection().toArray()
is no longer matching with array
