java to use jdk 17 (#2686)

diff --git a/lib/java/gradle/unitTests.gradle b/lib/java/gradle/unitTests.gradle
index db9ad82..293bcca 100644
--- a/lib/java/gradle/unitTests.gradle
+++ b/lib/java/gradle/unitTests.gradle
@@ -65,6 +65,8 @@
         outputs.upToDateWhen { false }
     }
 
+    // This is required for Mockito to run under Java 17
+    jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
     include '**/Test*.class'
     exclude '**/Test*\$*.class'