THRIFT-5560: use JUnit 5 for all Java lib tests (#2574)

diff --git a/lib/java/gradle/environment.gradle b/lib/java/gradle/environment.gradle
index 12fee15..2f49a0d 100644
--- a/lib/java/gradle/environment.gradle
+++ b/lib/java/gradle/environment.gradle
@@ -71,7 +71,7 @@
     compile "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}"
     compile "org.apache.commons:commons-lang3:3.12.0"
 
-    testCompile "junit:junit:${junitVersion}"
+    testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
     testCompile "org.mockito:mockito-all:${mockitoVersion}"
     testRuntime "org.slf4j:slf4j-log4j12:${slf4jVersion}"
 }