diff --git a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/PhoenixRemoteUserExtractorTest.java b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/PhoenixRemoteUserExtractorTest.java
index 6aaeb5b..2d725a1 100644
--- a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/PhoenixRemoteUserExtractorTest.java
+++ b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/PhoenixRemoteUserExtractorTest.java
@@ -17,7 +17,7 @@
package org.apache.phoenix.queryserver.server;
import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
diff --git a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerConfigurationTest.java b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerConfigurationTest.java
index 099a55a..37ead90 100644
--- a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerConfigurationTest.java
+++ b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/QueryServerConfigurationTest.java
@@ -17,8 +17,9 @@
*/
package org.apache.phoenix.queryserver.server;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -59,7 +60,7 @@ public void setup() throws IOException {
public void testSpnegoEnabled() throws IOException {
setupKeytabForSpnego();
// SPENEGO settings will be provided to the builder when enabled
- doReturn(builder).when(builder).withSpnego(anyString(), any(String[].class));
+ doReturn(builder).when(builder).withSpnego(anyString(), nullable(String[].class));
configureAndVerifyImpersonation(builder, false);
// A keytab file will also be provided for automatic login
verify(builder).withAutomaticLogin(any(File.class));
@@ -78,8 +79,8 @@ public void testSpnegoDisabled() throws IOException {
@Test
public void testCustomServerConfiguration() {
queryServer.enableCustomAuth(builder, CONF, ugi);
- verify(builder).withCustomAuthentication(any(AvaticaServerConfiguration.class));
- verify(builder, never()).withSpnego(anyString(), any(String[].class));
+ verify(builder).withCustomAuthentication(nullable(AvaticaServerConfiguration.class));
+ verify(builder, never()).withSpnego(anyString(), nullable(String[].class));
verify(builder, never()).withAutomaticLogin(any(File.class));
verify(builder, never()).withImpersonation(any(DoAsRemoteUserCallback.class));
}
diff --git a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/ServerCustomizersTest.java b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/ServerCustomizersTest.java
index e593bd1..93aa872 100644
--- a/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/ServerCustomizersTest.java
+++ b/phoenix-queryserver/src/test/java/org/apache/phoenix/queryserver/server/ServerCustomizersTest.java
@@ -33,7 +33,7 @@
import org.junit.Before;
import org.junit.Test;
-import static org.mockito.Matchers.*;
+import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
diff --git a/pom.xml b/pom.xml
index f83192c..fd76b1b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,7 @@
6.10
- 1.8.5
+ 4.11.0
4.13.2
@@ -1205,9 +1205,10 @@
org.mockito
- mockito-core
- ${mockito-all.version}
- test
+ mockito-bom
+ ${mockito.version}
+ pom
+ import
org.apache.hadoop