hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/2] hbase git commit: HBASE-18925 Update mockito dependency from mockito-all:1.10.19 to mockito-core:2.1.0 for JDK8 support.
Date Wed, 01 Nov 2017 21:43:25 GMT
HBASE-18925 Update mockito dependency from mockito-all:1.10.19 to mockito-core:2.1.0 for JDK8 support.

Last mockito-all release was in Dec'14. Mockito-core has had many releases since then.

>From mockito's site:
- "Mockito does not produce the mockito-all artifact anymore ; this one was primarily
aimed at ant users, and contained other dependencies. We felt it was time to move on
and remove such artifacts as they cause problems in dependency management system like
maven or gradle."
- anyX() and any(SomeType.class) matchers now reject nulls and check type.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d69570a4
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d69570a4
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d69570a4

Branch: refs/heads/branch-2
Commit: d69570a485de9c857139394c03aa43827b01e37d
Parents: d407e37
Author: Apekshit Sharma <appy@apache.org>
Authored: Mon Oct 2 22:53:34 2017 -0700
Committer: Apekshit Sharma <appy@apache.org>
Committed: Wed Nov 1 14:38:50 2017 -0700

----------------------------------------------------------------------
 hbase-client/pom.xml                            |   4 +-
 .../hadoop/hbase/client/TestClientScanner.java  |  35 +++----
 .../client/TestHTableMultiplexerViaMocks.java   |   2 +-
 .../hbase/client/TestSnapshotFromAdmin.java     |  10 +-
 .../hbase/security/TestHBaseSaslRpcClient.java  |   4 +-
 hbase-common/pom.xml                            |   2 +-
 hbase-endpoint/pom.xml                          |   2 +-
 hbase-examples/pom.xml                          |   2 +-
 .../hbase/mapreduce/TestMapReduceExamples.java  |  16 +--
 hbase-http/pom.xml                              |   2 +-
 .../apache/hadoop/hbase/http/HttpServer.java    |  13 ++-
 .../hadoop/hbase/http/TestHttpServer.java       |   6 +-
 hbase-mapreduce/pom.xml                         |   2 +-
 .../apache/hadoop/hbase/mapred/TestDriver.java  |   2 +-
 .../hbase/mapred/TestGroupingTableMap.java      |   2 +-
 .../hbase/mapred/TestIdentityTableMap.java      |   2 +-
 .../hadoop/hbase/mapred/TestRowCounter.java     |   4 +-
 .../mapreduce/TestGroupingTableMapper.java      |   2 +-
 .../hbase/mapreduce/TestImportExport.java       |   6 +-
 .../TestMultiTableSnapshotInputFormatImpl.java  |   7 +-
 .../hadoop/hbase/mapreduce/TestWALPlayer.java   |   6 +-
 hbase-metrics-api/pom.xml                       |   2 +-
 hbase-metrics/pom.xml                           |   2 +-
 hbase-rest/pom.xml                              |   2 +-
 .../rest/client/TestRemoteAdminRetries.java     |  18 ++--
 .../rest/client/TestRemoteHTableRetries.java    |  28 ++---
 hbase-rsgroup/pom.xml                           |   2 +-
 .../balancer/TestRSGroupBasedLoadBalancer.java  |   4 +-
 hbase-server/pom.xml                            |   2 +-
 .../hadoop/hbase/TestHBaseTestingUtility.java   |  27 ++---
 .../hbase/TestMetaTableAccessorNoCluster.java   |   4 +-
 .../hadoop/hbase/TestMetaTableLocator.java      |   6 +-
 .../TestZooKeeperTableArchiveClient.java        |   2 +-
 .../hbase/client/HConnectionTestingUtility.java |   4 +-
 .../TestForeignExceptionDispatcher.java         |   8 +-
 .../TestTimeoutExceptionInjector.java           |   6 +-
 .../hbase/ipc/TestSimpleRpcScheduler.java       |  40 ++------
 .../hbase/master/TestSplitLogManager.java       |   2 +-
 .../master/assignment/MockMasterServices.java   |  22 ++--
 .../hbase/master/cleaner/TestCleanerChore.java  |  10 +-
 .../normalizer/TestSimpleRegionNormalizer.java  |  14 ++-
 .../hadoop/hbase/procedure/TestProcedure.java   |   4 +-
 .../procedure/TestProcedureCoordinator.java     |  22 ++--
 .../hbase/procedure/TestProcedureMember.java    |  36 +++----
 .../hadoop/hbase/procedure/TestZKProcedure.java |   4 +-
 .../procedure/TestZKProcedureControllers.java   |   7 +-
 .../quotas/TestFileSystemUtilizationChore.java  |  16 +--
 .../TestMasterSpaceQuotaObserverWithMocks.java  |   2 +-
 .../TestNamespaceQuotaViolationStore.java       |   4 +-
 ...SpaceQuotaViolationPolicyRefresherChore.java |   4 +-
 .../quotas/TestTableQuotaViolationStore.java    |   4 +-
 .../TestTableSpaceQuotaViolationNotifier.java   |  15 +--
 .../regionserver/StatefulStoreMockMaker.java    |  30 ++----
 .../hadoop/hbase/regionserver/TestBulkLoad.java | 102 +++++++++----------
 .../hbase/regionserver/TestCompaction.java      |  19 ++--
 .../TestCompactionArchiveIOException.java       |   2 +-
 .../hadoop/hbase/regionserver/TestHRegion.java  |  13 ++-
 .../hadoop/hbase/regionserver/TestHStore.java   |   2 +-
 .../TestRegionServerRegionSpaceUseReport.java   |  12 +--
 .../regionserver/TestStripeStoreEngine.java     |  10 +-
 .../regionserver/compactions/TestCompactor.java |   8 +-
 .../compactions/TestDateTieredCompactor.java    |   3 +-
 .../compactions/TestStripeCompactionPolicy.java |  21 ++--
 .../compactions/TestStripeCompactor.java        |   3 +-
 .../regionserver/wal/AbstractTestWALReplay.java |   3 +-
 .../hadoop/hbase/tool/TestCanaryTool.java       |  35 ++++---
 .../TestLoadIncrementalHFilesSplitRecovery.java |   2 +-
 .../apache/hadoop/hbase/wal/TestWALSplit.java   |   2 +-
 .../hbase-shaded-check-invariants/pom.xml       |   2 +-
 pom.xml                                         |  22 ++--
 src/main/asciidoc/_chapters/unit_testing.adoc   |   4 +-
 71 files changed, 345 insertions(+), 404 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-client/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index cc7376a..0b224a2 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -192,7 +192,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -285,7 +285,7 @@
             <exclusion>
               <groupId>com.sun.jersey</groupId>
               <artifactId>jersey-json</artifactId>
-            </exclusion> 
+            </exclusion>
             <exclusion>
               <groupId>javax.servlet</groupId>
               <artifactId>servlet-api</artifactId>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java
index 9d21d1a..3f0c869 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java
@@ -138,13 +138,12 @@ public class TestClientScanner {
     RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class);
 
     Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller);
-    Mockito.when(caller.callWithoutRetries(Mockito.any(RetryingCallable.class),
+    Mockito.when(caller.callWithoutRetries(Mockito.any(),
       Mockito.anyInt())).thenAnswer(new Answer<Result[]>() {
         private int count = 0;
         @Override
         public Result[] answer(InvocationOnMock invocation) throws Throwable {
-            ScannerCallableWithReplicas callable = invocation.getArgumentAt(0,
-                ScannerCallableWithReplicas.class);
+            ScannerCallableWithReplicas callable = invocation.getArgument(0);
           switch (count) {
             case 0: // initialize
               count++;
@@ -176,7 +175,7 @@ public class TestClientScanner {
       // One for fetching the results
       // One for fetching empty results and quit as we do not have moreResults hint.
       inOrder.verify(caller, Mockito.times(2)).callWithoutRetries(
-          Mockito.any(RetryingCallable.class), Mockito.anyInt());
+          Mockito.any(), Mockito.anyInt());
 
       assertEquals(1, scanner.cache.size());
       Result r = scanner.cache.poll();
@@ -199,13 +198,12 @@ public class TestClientScanner {
     RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class);
 
     Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller);
-    Mockito.when(caller.callWithoutRetries(Mockito.any(RetryingCallable.class),
+    Mockito.when(caller.callWithoutRetries(Mockito.any(),
       Mockito.anyInt())).thenAnswer(new Answer<Result[]>() {
         private int count = 0;
         @Override
         public Result[] answer(InvocationOnMock invocation) throws Throwable {
-          ScannerCallableWithReplicas callable = invocation.getArgumentAt(0,
-              ScannerCallableWithReplicas.class);
+          ScannerCallableWithReplicas callable = invocation.getArgument(0);
           switch (count) {
             case 0: // initialize
               count++;
@@ -235,7 +233,7 @@ public class TestClientScanner {
       scanner.loadCache();
 
       inOrder.verify(caller, Mockito.times(1)).callWithoutRetries(
-          Mockito.any(RetryingCallable.class), Mockito.anyInt());
+          Mockito.any(), Mockito.anyInt());
 
       assertEquals(1, scanner.cache.size());
       Result r = scanner.cache.poll();
@@ -260,13 +258,12 @@ public class TestClientScanner {
     RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class);
 
     Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller);
-    Mockito.when(caller.callWithoutRetries(Mockito.any(RetryingCallable.class),
+    Mockito.when(caller.callWithoutRetries(Mockito.any(),
       Mockito.anyInt())).thenAnswer(new Answer<Result[]>() {
         private int count = 0;
         @Override
         public Result[] answer(InvocationOnMock invocation) throws Throwable {
-          ScannerCallableWithReplicas callable = invocation.getArgumentAt(0,
-              ScannerCallableWithReplicas.class);
+          ScannerCallableWithReplicas callable = invocation.getArgument(0);
           switch (count) {
             case 0: // initialize
               count++;
@@ -296,7 +293,7 @@ public class TestClientScanner {
       scanner.loadCache();
 
       inOrder.verify(caller, Mockito.times(1)).callWithoutRetries(
-          Mockito.any(RetryingCallable.class), Mockito.anyInt());
+          Mockito.any(), Mockito.anyInt());
 
       assertEquals(3, scanner.cache.size());
       Result r = scanner.cache.poll();
@@ -333,13 +330,12 @@ public class TestClientScanner {
     RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class);
 
     Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller);
-    Mockito.when(caller.callWithoutRetries(Mockito.any(RetryingCallable.class),
+    Mockito.when(caller.callWithoutRetries(Mockito.any(),
       Mockito.anyInt())).thenAnswer(new Answer<Result[]>() {
         private int count = 0;
         @Override
         public Result[] answer(InvocationOnMock invocation) throws Throwable {
-          ScannerCallableWithReplicas callable = invocation.getArgumentAt(0,
-              ScannerCallableWithReplicas.class);
+          ScannerCallableWithReplicas callable = invocation.getArgument(0);
           switch (count) {
             case 0: // initialize
               count++;
@@ -369,7 +365,7 @@ public class TestClientScanner {
       scanner.loadCache();
 
       inOrder.verify(caller, Mockito.times(1)).callWithoutRetries(
-          Mockito.any(RetryingCallable.class), Mockito.anyInt());
+          Mockito.any(), Mockito.anyInt());
 
       assertEquals(1, scanner.cache.size());
       Result r = scanner.cache.poll();
@@ -398,13 +394,12 @@ public class TestClientScanner {
     RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class);
 
     Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller);
-    Mockito.when(caller.callWithoutRetries(Mockito.any(RetryingCallable.class),
+    Mockito.when(caller.callWithoutRetries(Mockito.any(),
         Mockito.anyInt())).thenAnswer(new Answer<Result[]>() {
           private int count = 0;
           @Override
           public Result[] answer(InvocationOnMock invocation) throws Throwable {
-            ScannerCallableWithReplicas callable = invocation.getArgumentAt(0,
-                ScannerCallableWithReplicas.class);
+            ScannerCallableWithReplicas callable = invocation.getArgument(0);
             switch (count) {
               case 0: // initialize
                 count++;
@@ -436,7 +431,7 @@ public class TestClientScanner {
       scanner.loadCache();
 
       inOrder.verify(caller, Mockito.times(2)).callWithoutRetries(
-          Mockito.any(RetryingCallable.class), Mockito.anyInt());
+          Mockito.any(), Mockito.anyInt());
 
       assertEquals(2, scanner.cache.size());
       Result r = scanner.cache.poll();

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexerViaMocks.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexerViaMocks.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexerViaMocks.java
index 7e68c21..ef59eed 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexerViaMocks.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexerViaMocks.java
@@ -44,7 +44,7 @@ public class TestHTableMultiplexerViaMocks {
     mockConnection = mock(ClusterConnection.class);
 
     // Call the real put(TableName, Put, int) method
-    when(mockMultiplexer.put(any(TableName.class), any(Put.class), anyInt())).thenCallRealMethod();
+    when(mockMultiplexer.put(any(TableName.class), any(), anyInt())).thenCallRealMethod();
 
     // Return the mocked ClusterConnection
     when(mockMultiplexer.getConnection()).thenReturn(mockConnection);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java
index 177b614..b2c011c 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java
@@ -30,9 +30,7 @@ import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.ipc.HBaseRpcController;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSnapshotDoneRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSnapshotDoneResponse;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SnapshotRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SnapshotResponse;
 import org.apache.hadoop.hbase.testclassification.ClientTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
@@ -103,14 +101,14 @@ public class TestSnapshotFromAdmin {
     Mockito
     .when(
       mockMaster.snapshot((RpcController) Mockito.any(),
-        Mockito.any(SnapshotRequest.class))).thenReturn(response);
+        Mockito.any())).thenReturn(response);
     // setup the response
     IsSnapshotDoneResponse.Builder builder = IsSnapshotDoneResponse.newBuilder();
     builder.setDone(false);
     // first five times, we return false, last we get success
     Mockito.when(
       mockMaster.isSnapshotDone((RpcController) Mockito.any(),
-        Mockito.any(IsSnapshotDoneRequest.class))).thenReturn(builder.build(), builder.build(),
+        Mockito.any())).thenReturn(builder.build(), builder.build(),
           builder.build(), builder.build(), builder.build(), builder.setDone(true).build());
 
     // setup the admin and run the test
@@ -162,12 +160,12 @@ public class TestSnapshotFromAdmin {
     Mockito.when(mockConnection.getKeepAliveMasterService()).thenReturn(master);
     SnapshotResponse response = SnapshotResponse.newBuilder().setExpectedTimeout(0).build();
     Mockito.when(
-      master.snapshot((RpcController) Mockito.any(), Mockito.any(SnapshotRequest.class)))
+      master.snapshot((RpcController) Mockito.any(), Mockito.any()))
         .thenReturn(response);
     IsSnapshotDoneResponse doneResponse = IsSnapshotDoneResponse.newBuilder().setDone(true).build();
     Mockito.when(
       master.isSnapshotDone((RpcController) Mockito.any(),
-          Mockito.any(IsSnapshotDoneRequest.class))).thenReturn(doneResponse);
+          Mockito.any())).thenReturn(doneResponse);
 
       // make sure that we can use valid names
     admin.snapshot(new SnapshotDescription("snapshot", TableName.valueOf(name.getMethodName())));

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-client/src/test/java/org/apache/hadoop/hbase/security/TestHBaseSaslRpcClient.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/security/TestHBaseSaslRpcClient.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/security/TestHBaseSaslRpcClient.java
index 33f7872..282dc28 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/security/TestHBaseSaslRpcClient.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/security/TestHBaseSaslRpcClient.java
@@ -113,8 +113,8 @@ public class TestHBaseSaslRpcClient {
     final SaslClientCallbackHandler saslClCallbackHandler = new SaslClientCallbackHandler(token);
     saslClCallbackHandler.handle(callbackArray);
     verify(nameCallback).setName(anyString());
-    verify(realmCallback).setText(anyString());
-    verify(passwordCallback).setPassword(any(char[].class));
+    verify(realmCallback).setText(any());
+    verify(passwordCallback).setPassword(any());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-common/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index baafad1..2b4cac5 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -269,7 +269,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-endpoint/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-endpoint/pom.xml b/hbase-endpoint/pom.xml
index a60b43e..bf759c2 100644
--- a/hbase-endpoint/pom.xml
+++ b/hbase-endpoint/pom.xml
@@ -213,7 +213,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <!-- Some tests rely on Hadoop's KeyStoreTestUtil, which needs bc. -->

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-examples/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-examples/pom.xml b/hbase-examples/pom.xml
index 25f2f0b..9d4521b 100644
--- a/hbase-examples/pom.xml
+++ b/hbase-examples/pom.xml
@@ -206,7 +206,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-examples/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMapReduceExamples.java
----------------------------------------------------------------------
diff --git a/hbase-examples/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMapReduceExamples.java b/hbase-examples/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMapReduceExamples.java
index 1f10cb9..089dafd 100644
--- a/hbase-examples/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMapReduceExamples.java
+++ b/hbase-examples/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMapReduceExamples.java
@@ -4,9 +4,9 @@
  * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with the License. You may
  * obtain a copy of the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the
  * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  * either express or implied. See the License for the specific language governing permissions and
@@ -63,13 +63,13 @@ public class TestMapReduceExamples {
 
       @Override
       public Void answer(InvocationOnMock invocation) throws Throwable {
-        ImmutableBytesWritable writer = (ImmutableBytesWritable) invocation.getArguments()[0];
-        Put put = (Put) invocation.getArguments()[1];
+        ImmutableBytesWritable writer = (ImmutableBytesWritable) invocation.getArgument(0);
+        Put put = (Put) invocation.getArgument(1);
         assertEquals("row", Bytes.toString(writer.get()));
         assertEquals("row", Bytes.toString(put.getRow()));
         return null;
       }
-    }).when(ctx).write(any(ImmutableBytesWritable.class), any(Put.class));
+    }).when(ctx).write(any(), any());
 
     uploader.map(null, new Text("row,family,qualifier,value"), ctx);
 
@@ -134,13 +134,13 @@ public class TestMapReduceExamples {
 
       @Override
       public Void answer(InvocationOnMock invocation) throws Throwable {
-        ImmutableBytesWritable writer = (ImmutableBytesWritable) invocation.getArguments()[0];
-        Put put = (Put) invocation.getArguments()[1];
+        ImmutableBytesWritable writer = (ImmutableBytesWritable) invocation.getArgument(0);
+        Put put = (Put) invocation.getArgument(1);
         assertEquals("tableName-column1", Bytes.toString(writer.get()));
         assertEquals("test", Bytes.toString(put.getRow()));
         return null;
       }
-    }).when(ctx).write(any(ImmutableBytesWritable.class), any(Put.class));
+    }).when(ctx).write(any(), any());
     Result result = mock(Result.class);
     when(result.getValue(Bytes.toBytes("columnFamily"), Bytes.toBytes("column1"))).thenReturn(
         Bytes.toBytes("test"));

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-http/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-http/pom.xml b/hbase-http/pom.xml
index 569f161..f29b2bb 100644
--- a/hbase-http/pom.xml
+++ b/hbase-http/pom.xml
@@ -311,7 +311,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
----------------------------------------------------------------------
diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index 726595b..c2b5944 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.hbase.http;
 
+import com.google.common.annotations.VisibleForTesting;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -32,6 +33,7 @@ import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
@@ -48,6 +50,8 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.HadoopIllegalArgumentException;
+import org.apache.hadoop.hbase.shaded.com.google.common.base.Preconditions;
+import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceStability;
 import org.apache.hadoop.conf.Configuration;
@@ -90,9 +94,6 @@ import org.eclipse.jetty.webapp.WebAppContext;
 import org.glassfish.jersey.server.ResourceConfig;
 import org.glassfish.jersey.servlet.ServletContainer;
 
-import org.apache.hadoop.hbase.shaded.com.google.common.base.Preconditions;
-import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
-
 /**
  * Create a Jetty embedded server to answer http requests. The primary goal
  * is to serve up status information for the server.
@@ -161,6 +162,11 @@ public class HttpServer implements FilterContainer {
 
   private final List<ListenerInfo> listeners = Lists.newArrayList();
 
+  @VisibleForTesting
+  public List<ServerConnector> getServerConnectors() {
+    return listeners.stream().map(info -> info.listener).collect(Collectors.toList());
+  }
+
   protected final WebAppContext webAppContext;
   protected final boolean findPort;
   protected final Map<ServletContextHandler, Boolean> defaultContexts = new HashMap<>();
@@ -1011,6 +1017,7 @@ public class HttpServer implements FilterContainer {
    * Open the main listener for the server
    * @throws Exception
    */
+  @VisibleForTesting
   void openListeners() throws Exception {
     for (ListenerInfo li : listeners) {
       ServerConnector listener = li.listener;

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
----------------------------------------------------------------------
diff --git a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
index 2eb6a21..fddb2a4 100644
--- a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
+++ b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
@@ -67,7 +67,6 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
-import org.mockito.internal.util.reflection.Whitebox;
 
 @Category({MiscTests.class, SmallTests.class})
 public class TestHttpServer extends HttpServerFunctionalTest {
@@ -557,10 +556,7 @@ public class TestHttpServer extends HttpServerFunctionalTest {
     HttpServer server = createServer(host, port);
     try {
       // not bound, ephemeral should return requested port (0 for ephemeral)
-      List<?> listeners = (List<?>) Whitebox.getInternalState(server,
-          "listeners");
-      ServerConnector listener = (ServerConnector) Whitebox.getInternalState(
-          listeners.get(0), "listener");
+      ServerConnector listener = server.getServerConnectors().get(0);
 
       assertEquals(port, listener.getPort());
       // verify hostname is what was given

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/pom.xml b/hbase-mapreduce/pom.xml
index f87cedd..b113469 100644
--- a/hbase-mapreduce/pom.xml
+++ b/hbase-mapreduce/pom.xml
@@ -262,7 +262,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestDriver.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestDriver.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestDriver.java
index d085c21..fa03a17 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestDriver.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestDriver.java
@@ -36,6 +36,6 @@ public class TestDriver {
     ProgramDriver programDriverMock = mock(ProgramDriver.class);
     Driver.setProgramDriver(programDriverMock);
     Driver.main(new String[]{});
-    verify(programDriverMock).driver(Mockito.any(String[].class));
+    verify(programDriverMock).driver(Mockito.any());
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestGroupingTableMap.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestGroupingTableMap.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestGroupingTableMap.java
index 7131cf9..5c4b6a9 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestGroupingTableMap.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestGroupingTableMap.java
@@ -107,7 +107,7 @@ public class TestGroupingTableMap {
       gTableMap.map(null, result, outputCollectorMock, reporter);
       verify(result).listCells();
       verify(outputCollectorMock, times(1))
-        .collect(any(ImmutableBytesWritable.class), any(Result.class));
+        .collect(any(), any());
       verifyNoMoreInteractions(outputCollectorMock);
     } finally {
       if (gTableMap != null)

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestIdentityTableMap.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestIdentityTableMap.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestIdentityTableMap.java
index e222d0b..be65d84 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestIdentityTableMap.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestIdentityTableMap.java
@@ -55,7 +55,7 @@ public class TestIdentityTableMap {
             reporterMock);
 
       verify(outputCollectorMock, times(recordNumber)).collect(
-          Mockito.any(ImmutableBytesWritable.class), Mockito.any(Result.class));
+          Mockito.any(), Mockito.any());
     } finally {
       if (identityTableMap != null)
         identityTableMap.close();

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestRowCounter.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestRowCounter.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestRowCounter.java
index 4ebd8bf..bc9ebb7 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestRowCounter.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapred/TestRowCounter.java
@@ -21,8 +21,8 @@ package org.apache.hadoop.hbase.mapred;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyInt;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 
@@ -89,7 +89,7 @@ public class TestRowCounter {
           mock(OutputCollector.class), reporter);
 
     Mockito.verify(reporter, times(iterationNumber)).incrCounter(
-        any(Enum.class), anyInt());
+        any(), anyLong());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestGroupingTableMapper.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestGroupingTableMapper.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestGroupingTableMapper.java
index 7e36602..ec7ddee 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestGroupingTableMapper.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestGroupingTableMapper.java
@@ -50,7 +50,7 @@ public class TestGroupingTableMapper {
     @SuppressWarnings("unchecked")
     Mapper<ImmutableBytesWritable, Result, ImmutableBytesWritable, Result>.Context context =
         mock(Mapper.Context.class);
-    context.write(any(ImmutableBytesWritable.class), any(Result.class));
+    context.write(any(), any());
     List<Cell> keyValue = new ArrayList<>();
     byte[] row = {};
     keyValue.add(new KeyValue(row, Bytes.toBytes("family2"), Bytes.toBytes("clm"), Bytes

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
index 606e0ce..398e7e5 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
@@ -675,13 +675,13 @@ public class TestImportExport {
 
       @Override
       public Void answer(InvocationOnMock invocation) throws Throwable {
-        ImmutableBytesWritable writer = (ImmutableBytesWritable) invocation.getArguments()[0];
-        KeyValue key = (KeyValue) invocation.getArguments()[1];
+        ImmutableBytesWritable writer = invocation.getArgument(0);
+        KeyValue key = invocation.getArgument(1);
         assertEquals("Key", Bytes.toString(writer.get()));
         assertEquals("row", Bytes.toString(CellUtil.cloneRow(key)));
         return null;
       }
-    }).when(ctx).write(any(ImmutableBytesWritable.class), any(KeyValue.class));
+    }).when(ctx).write(any(), any());
 
     importer.setup(ctx);
     Result value = mock(Result.class);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormatImpl.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormatImpl.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormatImpl.java
index 1c33848..8897218 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormatImpl.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormatImpl.java
@@ -23,7 +23,6 @@ import org.apache.hadoop.hbase.shaded.com.google.common.collect.ImmutableMap;
 import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
 import org.apache.hadoop.hbase.shaded.com.google.common.collect.Maps;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
@@ -68,8 +67,8 @@ public class TestMultiTableSnapshotInputFormatImpl {
     // probably be the more "pure"
     // way of doing things. This is the lesser of two evils, perhaps?
     doNothing().when(this.subject).
-        restoreSnapshot(any(Configuration.class), any(String.class), any(Path.class),
-            any(Path.class), any(FileSystem.class));
+        restoreSnapshot(any(), any(), any(),
+            any(), any());
 
     this.conf = new Configuration();
     this.rootDir = new Path("file:///test-root-dir");
@@ -180,7 +179,7 @@ public class TestMultiTableSnapshotInputFormatImpl {
 
     for (Map.Entry<String, Path> entry : snapshotDirs.entrySet()) {
       verify(this.subject).restoreSnapshot(eq(this.conf), eq(entry.getKey()), eq(this.rootDir),
-          eq(entry.getValue()), any(FileSystem.class));
+          eq(entry.getValue()), any());
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
index 13b1b1e..a35c88e 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALPlayer.java
@@ -184,13 +184,13 @@ public class TestWALPlayer {
 
       @Override
       public Void answer(InvocationOnMock invocation) throws Throwable {
-        ImmutableBytesWritable writer = (ImmutableBytesWritable) invocation.getArguments()[0];
-        KeyValue key = (KeyValue) invocation.getArguments()[1];
+        ImmutableBytesWritable writer = invocation.getArgument(0);
+        KeyValue key = invocation.getArgument(1);
         assertEquals("row", Bytes.toString(writer.get()));
         assertEquals("row", Bytes.toString(CellUtil.cloneRow(key)));
         return null;
       }
-    }).when(context).write(any(ImmutableBytesWritable.class), any(KeyValue.class));
+    }).when(context).write(any(), any());
 
     mapper.map(key, value, context);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-metrics-api/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml
index 6393528..17073c3 100644
--- a/hbase-metrics-api/pom.xml
+++ b/hbase-metrics-api/pom.xml
@@ -98,7 +98,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-metrics/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-metrics/pom.xml b/hbase-metrics/pom.xml
index 924ea92..2bf225e 100644
--- a/hbase-metrics/pom.xml
+++ b/hbase-metrics/pom.xml
@@ -111,7 +111,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-rest/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml
index 4e0dbb6..46de8b8 100644
--- a/hbase-rest/pom.xml
+++ b/hbase-rest/pom.xml
@@ -331,7 +331,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteAdminRetries.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteAdminRetries.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteAdminRetries.java
index b926d82..706402c 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteAdminRetries.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteAdminRetries.java
@@ -49,9 +49,9 @@ public class TestRemoteAdminRetries {
   private static final int SLEEP_TIME = 50;
   private static final int RETRIES = 3;
   private static final long MAX_TIME = SLEEP_TIME * (RETRIES - 1);
-  
+
   private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
-  
+
   private RemoteAdmin remoteAdmin;
   private Client client;
 
@@ -61,8 +61,8 @@ public class TestRemoteAdminRetries {
     Response response = new Response(509);
     when(client.get(anyString(), anyString())).thenReturn(response);
     when(client.delete(anyString())).thenReturn(response);
-    when(client.put(anyString(), anyString(), any(byte[].class))).thenReturn(response);
-    when(client.post(anyString(), anyString(), any(byte[].class))).thenReturn(response);
+    when(client.put(anyString(), anyString(), any())).thenReturn(response);
+    when(client.post(anyString(), anyString(), any())).thenReturn(response);
     Configuration configuration = TEST_UTIL.getConfiguration();
 
     configuration.setInt("hbase.rest.client.max.retries", RETRIES);
@@ -80,7 +80,7 @@ public class TestRemoteAdminRetries {
       }
     });
   }
-  
+
   @Test
   public void testFailingGetClusterStatus() throws Exception  {
     testTimedOutGetCall(new CallExecutor() {
@@ -120,7 +120,7 @@ public class TestRemoteAdminRetries {
         remoteAdmin.createTable(new HTableDescriptor(TableName.valueOf("TestTable")));
       }
     });
-    verify(client, times(RETRIES)).put(anyString(), anyString(), any(byte[].class));
+    verify(client, times(RETRIES)).put(anyString(), anyString(), any());
   }
 
   @Test
@@ -143,12 +143,12 @@ public class TestRemoteAdminRetries {
       }
     });
   }
-  
+
   private void testTimedOutGetCall(CallExecutor callExecutor) throws Exception {
     testTimedOutCall(callExecutor);
     verify(client, times(RETRIES)).get(anyString(), anyString());
   }
-  
+
   private void testTimedOutCall(CallExecutor callExecutor) throws Exception {
     long start = System.currentTimeMillis();
     try {
@@ -163,5 +163,5 @@ public class TestRemoteAdminRetries {
   private static interface CallExecutor {
     void run() throws Exception;
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteHTableRetries.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteHTableRetries.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteHTableRetries.java
index 4a595f3..b25b63c 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteHTableRetries.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteHTableRetries.java
@@ -55,7 +55,7 @@ public class TestRemoteHTableRetries {
   private static final long MAX_TIME = SLEEP_TIME * (RETRIES - 1);
 
   private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
-  
+
   private static final byte[] ROW_1 = Bytes.toBytes("testrow1");
   private static final byte[] COLUMN_1 = Bytes.toBytes("a");
   private static final byte[] QUALIFIER_1 = Bytes.toBytes("1");
@@ -63,16 +63,16 @@ public class TestRemoteHTableRetries {
 
   private Client client;
   private RemoteHTable remoteTable;
-  
+
   @Before
   public void setup() throws Exception {
     client = mock(Client.class);
     Response response = new Response(509);
     when(client.get(anyString(), anyString())).thenReturn(response);
     when(client.delete(anyString())).thenReturn(response);
-    when(client.put(anyString(), anyString(), any(byte[].class))).thenReturn(
+    when(client.put(anyString(), anyString(), any())).thenReturn(
         response);
-    when(client.post(anyString(), anyString(), any(byte[].class))).thenReturn(
+    when(client.post(anyString(), anyString(), any())).thenReturn(
         response);
 
     Configuration configuration = TEST_UTIL.getConfiguration();
@@ -87,7 +87,7 @@ public class TestRemoteHTableRetries {
   public void tearDownAfterClass() throws Exception {
     remoteTable.close();
   }
-  
+
   @Test
   public void testDelete() throws Exception {
     testTimedOutCall(new CallExecutor() {
@@ -99,7 +99,7 @@ public class TestRemoteHTableRetries {
     });
     verify(client, times(RETRIES)).delete(anyString());
   }
-  
+
   @Test
   public void testGet() throws Exception {
     testTimedOutGetCall(new CallExecutor() {
@@ -118,9 +118,9 @@ public class TestRemoteHTableRetries {
         remoteTable.put(new Put(Bytes.toBytes("Row")));
       }
     });
-    verify(client, times(RETRIES)).put(anyString(), anyString(), any(byte[].class));
+    verify(client, times(RETRIES)).put(anyString(), anyString(), any());
   }
-  
+
   @Test
   public void testMultiRowPut() throws Exception {
     testTimedOutCall(new CallExecutor() {
@@ -131,7 +131,7 @@ public class TestRemoteHTableRetries {
         remoteTable.put(Arrays.asList(puts));
       }
     });
-    verify(client, times(RETRIES)).put(anyString(), anyString(), any(byte[].class));
+    verify(client, times(RETRIES)).put(anyString(), anyString(), any());
   }
 
   @Test
@@ -142,9 +142,9 @@ public class TestRemoteHTableRetries {
         remoteTable.getScanner(new Scan());
       }
     });
-    verify(client, times(RETRIES)).post(anyString(), anyString(), any(byte[].class));
+    verify(client, times(RETRIES)).post(anyString(), anyString(), any());
   }
-  
+
   @Test
   public void testCheckAndPut() throws Exception {
     testTimedOutCall(new CallExecutor() {
@@ -155,7 +155,7 @@ public class TestRemoteHTableRetries {
         remoteTable.checkAndPut(ROW_1, COLUMN_1, QUALIFIER_1, VALUE_1, put );
       }
     });
-    verify(client, times(RETRIES)).put(anyString(), anyString(), any(byte[].class));
+    verify(client, times(RETRIES)).put(anyString(), anyString(), any());
   }
 
   @Test
@@ -170,12 +170,12 @@ public class TestRemoteHTableRetries {
       }
     });
   }
-  
+
   private void testTimedOutGetCall(CallExecutor callExecutor) throws Exception {
     testTimedOutCall(callExecutor);
     verify(client, times(RETRIES)).get(anyString(), anyString());
   }
-  
+
   private void testTimedOutCall(CallExecutor callExecutor) throws Exception {
     long start = System.currentTimeMillis();
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-rsgroup/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/pom.xml b/hbase-rsgroup/pom.xml
index 3526677..f44b6bd 100644
--- a/hbase-rsgroup/pom.xml
+++ b/hbase-rsgroup/pom.xml
@@ -159,7 +159,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
index db7cf4d..5ce0c09 100644
--- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
+++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java
@@ -582,11 +582,11 @@ public class TestRSGroupBasedLoadBalancer {
     Mockito.when(gm.listRSGroups()).thenReturn(
         Lists.newLinkedList(groupMap.values()));
     Mockito.when(gm.isOnline()).thenReturn(true);
-    Mockito.when(gm.getRSGroupOfTable(Mockito.any(TableName.class)))
+    Mockito.when(gm.getRSGroupOfTable(Mockito.any()))
         .thenAnswer(new Answer<String>() {
           @Override
           public String answer(InvocationOnMock invocation) throws Throwable {
-            return tableMap.get(invocation.getArguments()[0]);
+            return tableMap.get(invocation.getArgument(0));
           }
         });
     return gm;

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml
index e487559..eb537fb 100644
--- a/hbase-server/pom.xml
+++ b/hbase-server/pom.xml
@@ -605,7 +605,7 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
index be1307e..1d752d2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
@@ -23,6 +23,9 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 import java.io.File;
 import java.io.IOException;
@@ -402,8 +405,8 @@ public class TestHBaseTestingUtility {
 
   @Test public void testResolvePortConflict() throws Exception {
     // raises port conflict between 1st call and 2nd call of randomPort() by mocking Random object
-    Random random = Mockito.mock(Random.class);
-    Mockito.when(random.nextInt(Mockito.any(Integer.class)))
+    Random random = mock(Random.class);
+    when(random.nextInt(anyInt()))
       .thenAnswer(new Answer<Integer>() {
         int[] numbers = { 1, 1, 2 };
         int count = 0;
@@ -417,8 +420,8 @@ public class TestHBaseTestingUtility {
       });
 
     HBaseTestingUtility.PortAllocator.AvailablePortChecker portChecker =
-      Mockito.mock(HBaseTestingUtility.PortAllocator.AvailablePortChecker.class);
-    Mockito.when(portChecker.available(Mockito.any(Integer.class))).thenReturn(true);
+      mock(HBaseTestingUtility.PortAllocator.AvailablePortChecker.class);
+    when(portChecker.available(anyInt())).thenReturn(true);
 
     HBaseTestingUtility.PortAllocator portAllocator =
       new HBaseTestingUtility.PortAllocator(random, portChecker);
@@ -426,7 +429,7 @@ public class TestHBaseTestingUtility {
     int port1 = portAllocator.randomFreePort();
     int port2 = portAllocator.randomFreePort();
     assertNotEquals(port1, port2);
-    Mockito.verify(random, Mockito.times(3)).nextInt(Mockito.any(Integer.class));
+    Mockito.verify(random, Mockito.times(3)).nextInt(anyInt());
   }
 
   @Test
@@ -452,7 +455,7 @@ public class TestHBaseTestingUtility {
     assertEquals(nonDefaultRegionServerPort
             , htu.getConfiguration().getInt(HConstants.REGIONSERVER_PORT, 0));
   }
-  
+
   @Test public void testMRYarnConfigsPopulation() throws IOException {
     Map<String, String> dummyProps = new HashMap<>();
     dummyProps.put("mapreduce.jobtracker.address", "dummyhost:11234");
@@ -461,27 +464,27 @@ public class TestHBaseTestingUtility {
     dummyProps.put("yarn.resourcemanager.scheduler.address", "dummyhost:11237");
     dummyProps.put("mapreduce.jobhistory.webapp.address", "dummyhost:11238");
     dummyProps.put("yarn.resourcemanager.webapp.address", "dummyhost:11239");
-  
+
     HBaseTestingUtility hbt = new HBaseTestingUtility();
-    
+
     // populate the mr props to the Configuration instance
     for (Entry<String, String> entry : dummyProps.entrySet()) {
       hbt.getConfiguration().set(entry.getKey(), entry.getValue());
     }
-    
+
     for (Entry<String,String> entry : dummyProps.entrySet()) {
       assertTrue("The Configuration for key " + entry.getKey() +" and value: " + entry.getValue() +
                  " is not populated correctly", hbt.getConfiguration().get(entry.getKey()).equals(entry.getValue()));
     }
 
     hbt.startMiniMapReduceCluster();
-    
-    // Confirm that MiniMapReduceCluster overwrites the mr properties and updates the Configuration 
+
+    // Confirm that MiniMapReduceCluster overwrites the mr properties and updates the Configuration
     for (Entry<String,String> entry : dummyProps.entrySet()) {
       assertFalse("The MR prop: " + entry.getValue() + " is not overwritten when map reduce mini"+
                   "cluster is started", hbt.getConfiguration().get(entry.getKey()).equals(entry.getValue()));
     }
-    
+
     hbt.shutdownMiniMapReduceCluster();
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
index cec2c20..fb1c1e2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
@@ -165,7 +165,7 @@ public class TestMetaTableAccessorNoCluster {
           .thenThrow(new ServiceException("Server not running (3 of 3)"))
           .thenAnswer(new Answer<ScanResponse>() {
             public ScanResponse answer(InvocationOnMock invocation) throws Throwable {
-              ((HBaseRpcController) invocation.getArguments()[0]).setCellScanner(CellUtil
+              ((HBaseRpcController) invocation.getArgument(0)).setCellScanner(CellUtil
                   .createCellScanner(cellScannables));
               return builder.setScannerId(1234567890L).setMoreResults(false).build();
             }
@@ -189,7 +189,7 @@ public class TestMetaTableAccessorNoCluster {
 
       // Now shove our HRI implementation into the spied-upon connection.
       Mockito.doReturn(implementation).
-        when(connection).getClient(Mockito.any(ServerName.class));
+        when(connection).getClient(Mockito.any());
 
       // Scan meta for user tables and verify we got back expected answer.
       NavigableMap<RegionInfo, Result> hris =

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableLocator.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableLocator.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableLocator.java
index 8bebd8d..6a904a7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableLocator.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableLocator.java
@@ -250,7 +250,7 @@ public class TestMetaTableLocator {
       Mockito.mock(AdminProtos.AdminService.BlockingInterface.class);
     Mockito.when(implementation.getRegionInfo((RpcController)Mockito.any(),
       (GetRegionInfoRequest)Mockito.any())).thenThrow(connectException);
-    Mockito.when(connection.getAdmin(Mockito.any(ServerName.class))).
+    Mockito.when(connection.getAdmin(Mockito.any())).
       thenReturn(implementation);
         RpcControllerFactory controllerFactory = Mockito.mock(RpcControllerFactory.class);
         Mockito.when(controllerFactory.newController()).thenReturn(
@@ -325,12 +325,12 @@ public class TestMetaTableLocator {
       thenReturn(anyLocation);
     if (admin != null) {
       // If a call to getHRegionConnection, return this implementation.
-      Mockito.when(connection.getAdmin(Mockito.any(ServerName.class))).
+      Mockito.when(connection.getAdmin(Mockito.any())).
         thenReturn(admin);
     }
     if (client != null) {
       // If a call to getClient, return this implementation.
-      Mockito.when(connection.getClient(Mockito.any(ServerName.class))).
+      Mockito.when(connection.getClient(Mockito.any())).
         thenReturn(client);
     }
     return connection;

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
index 20cb513..aa246c2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
@@ -362,7 +362,7 @@ public class TestZooKeeperTableArchiveClient {
       public Iterable<FileStatus> answer(InvocationOnMock invocation) throws Throwable {
         counter[0]++;
         LOG.debug(counter[0] + "/ " + expected + ") Wrapping call to getDeletableFiles for files: "
-            + invocation.getArguments()[0]);
+            + invocation.getArgument(0));
 
         @SuppressWarnings("unchecked")
         Iterable<FileStatus> ret = (Iterable<FileStatus>) invocation.callRealMethod();

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
index d7d1b3a..8ef784c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
@@ -116,12 +116,12 @@ public class HConnectionTestingUtility {
         .thenReturn(new RegionLocations(loc));
     if (admin != null) {
       // If a call to getAdmin, return this implementation.
-      Mockito.when(c.getAdmin(Mockito.any(ServerName.class))).
+      Mockito.when(c.getAdmin(Mockito.any())).
         thenReturn(admin);
     }
     if (client != null) {
       // If a call to getClient, return this client.
-      Mockito.when(c.getClient(Mockito.any(ServerName.class))).
+      Mockito.when(c.getClient(Mockito.any())).
         thenReturn(client);
     }
     NonceGenerator ng = Mockito.mock(NonceGenerator.class);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestForeignExceptionDispatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestForeignExceptionDispatcher.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestForeignExceptionDispatcher.java
index 3e3aa45..650e4d6 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestForeignExceptionDispatcher.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestForeignExceptionDispatcher.java
@@ -96,8 +96,8 @@ public class TestForeignExceptionDispatcher {
     assertTrue("Monitor didn't get timeout", monitor.hasException());
 
     // verify that that we propagated the error
-    Mockito.verify(listener1).receive(Mockito.any(ForeignException.class));
-    Mockito.verify(listener2).receive(Mockito.any(ForeignException.class));
+    Mockito.verify(listener1).receive(Mockito.any());
+    Mockito.verify(listener2).receive(Mockito.any());
   }
 
   /**
@@ -118,7 +118,7 @@ public class TestForeignExceptionDispatcher {
     timer.start();
     timer.trigger();
     // make sure that we got the timer error
-    Mockito.verify(listener1, Mockito.times(1)).receive(Mockito.any(ForeignException.class));
-    Mockito.verify(listener2, Mockito.times(1)).receive(Mockito.any(ForeignException.class));
+    Mockito.verify(listener1, Mockito.times(1)).receive(Mockito.any());
+    Mockito.verify(listener2, Mockito.times(1)).receive(Mockito.any());
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestTimeoutExceptionInjector.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestTimeoutExceptionInjector.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestTimeoutExceptionInjector.java
index 49f6164..37af804 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestTimeoutExceptionInjector.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestTimeoutExceptionInjector.java
@@ -45,7 +45,7 @@ public class TestTimeoutExceptionInjector {
     TimeoutExceptionInjector timer = new TimeoutExceptionInjector(listener, time);
     timer.start();
     timer.trigger();
-    Mockito.verify(listener, Mockito.times(1)).receive(Mockito.any(ForeignException.class));
+    Mockito.verify(listener, Mockito.times(1)).receive(Mockito.any());
   }
 
   /**
@@ -58,7 +58,7 @@ public class TestTimeoutExceptionInjector {
     TimeoutExceptionInjector timer = new TimeoutExceptionInjector(listener, time);
     timer.start();
     timer.trigger();
-    Mockito.verify(listener).receive(Mockito.any(ForeignException.class));
+    Mockito.verify(listener).receive(Mockito.any());
   }
 
   /**
@@ -98,7 +98,7 @@ public class TestTimeoutExceptionInjector {
       LOG.debug("Correctly failed timer: " + e.getMessage());
     }
     Thread.sleep(time * 2);
-    Mockito.verify(listener, Mockito.times(1)).receive(Mockito.any(ForeignException.class));
+    Mockito.verify(listener, Mockito.times(1)).receive(Mockito.any());
     Mockito.verifyNoMoreInteractions(listener);
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
index 8364b22..bb91770 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestSimpleRpcScheduler.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyObject;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
@@ -42,7 +41,6 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.CountDownLatch;
@@ -56,8 +54,6 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandlerImpl;
-import org.apache.hadoop.hbase.security.User;
-import org.apache.hadoop.hbase.shaded.com.google.protobuf.Message;
 import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos;
@@ -182,7 +178,6 @@ public class TestSimpleRpcScheduler {
 
   @Test
   public void testHandlerIsolation() throws IOException, InterruptedException {
-
     CallRunner generalTask = createMockTask();
     CallRunner priorityTask = createMockTask();
     CallRunner replicationTask = createMockTask();
@@ -219,9 +214,7 @@ public class TestSimpleRpcScheduler {
     scheduler.init(CONTEXT);
     scheduler.start();
     for (CallRunner task : tasks) {
-      when(qosFunction.getPriority((RPCProtos.RequestHeader) anyObject(),
-        (Message) anyObject(), (User) anyObject()))
-          .thenReturn(qos.get(task));
+      when(qosFunction.getPriority(any(), any(), any())).thenReturn(qos.get(task));
       scheduler.dispatch(task);
     }
     for (CallRunner task : tasks) {
@@ -238,13 +231,11 @@ public class TestSimpleRpcScheduler {
     ServerCall call = mock(ServerCall.class);
     CallRunner task = mock(CallRunner.class);
     when(task.getRpcCall()).thenReturn(call);
-    when(call.getRequestUser()).thenReturn(Optional.empty());
     return task;
   }
 
   @Test
   public void testRpcScheduler() throws Exception {
-
     testRpcScheduler(RpcExecutor.CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE);
     testRpcScheduler(RpcExecutor.CALL_QUEUE_TYPE_FIFO_CONF_VALUE);
   }
@@ -254,9 +245,7 @@ public class TestSimpleRpcScheduler {
     schedConf.set(RpcExecutor.CALL_QUEUE_TYPE_CONF_KEY, queueType);
 
     PriorityFunction priority = mock(PriorityFunction.class);
-    when(priority.getPriority(any(RequestHeader.class),
-      any(Message.class), any(User.class)))
-      .thenReturn(HConstants.NORMAL_QOS);
+    when(priority.getPriority(any(), any(), any())).thenReturn(HConstants.NORMAL_QOS);
 
     RpcScheduler scheduler = new SimpleRpcScheduler(schedConf, 1, 1, 1, priority,
                                                     HConstants.QOS_THRESHOLD);
@@ -268,25 +257,22 @@ public class TestSimpleRpcScheduler {
       RequestHeader smallHead = RequestHeader.newBuilder().setCallId(1).build();
       when(smallCallTask.getRpcCall()).thenReturn(smallCall);
       when(smallCall.getHeader()).thenReturn(smallHead);
-      when(smallCall.getRequestUser()).thenReturn(Optional.empty());
 
       CallRunner largeCallTask = mock(CallRunner.class);
       ServerCall largeCall = mock(ServerCall.class);
       RequestHeader largeHead = RequestHeader.newBuilder().setCallId(50).build();
       when(largeCallTask.getRpcCall()).thenReturn(largeCall);
       when(largeCall.getHeader()).thenReturn(largeHead);
-      when(largeCall.getRequestUser()).thenReturn(Optional.empty());
 
       CallRunner hugeCallTask = mock(CallRunner.class);
       ServerCall hugeCall = mock(ServerCall.class);
       RequestHeader hugeHead = RequestHeader.newBuilder().setCallId(100).build();
       when(hugeCallTask.getRpcCall()).thenReturn(hugeCall);
       when(hugeCall.getHeader()).thenReturn(hugeHead);
-      when(hugeCall.getRequestUser()).thenReturn(Optional.empty());
 
-      when(priority.getDeadline(eq(smallHead), any(Message.class))).thenReturn(0L);
-      when(priority.getDeadline(eq(largeHead), any(Message.class))).thenReturn(50L);
-      when(priority.getDeadline(eq(hugeHead), any(Message.class))).thenReturn(100L);
+      when(priority.getDeadline(eq(smallHead), any())).thenReturn(0L);
+      when(priority.getDeadline(eq(largeHead), any())).thenReturn(50L);
+      when(priority.getDeadline(eq(hugeHead), any())).thenReturn(100L);
 
       final ArrayList<Integer> work = new ArrayList<>();
       doAnswerTaskExecution(smallCallTask, work, 10, 250);
@@ -337,8 +323,7 @@ public class TestSimpleRpcScheduler {
     schedConf.setFloat(RWQueueRpcExecutor.CALL_QUEUE_SCAN_SHARE_CONF_KEY, 0f);
 
     PriorityFunction priority = mock(PriorityFunction.class);
-    when(priority.getPriority(any(RequestHeader.class), any(Message.class),
-      any(User.class))).thenReturn(HConstants.NORMAL_QOS);
+    when(priority.getPriority(any(), any(), any())).thenReturn(HConstants.NORMAL_QOS);
 
     RpcScheduler scheduler = new SimpleRpcScheduler(schedConf, 2, 1, 1, priority,
                                                     HConstants.QOS_THRESHOLD);
@@ -353,8 +338,7 @@ public class TestSimpleRpcScheduler {
     schedConf.setFloat(RWQueueRpcExecutor.CALL_QUEUE_SCAN_SHARE_CONF_KEY, 0.5f);
 
     PriorityFunction priority = mock(PriorityFunction.class);
-    when(priority.getPriority(any(RPCProtos.RequestHeader.class), any(Message.class),
-      any(User.class))).thenReturn(HConstants.NORMAL_QOS);
+    when(priority.getPriority(any(), any(), any())).thenReturn(HConstants.NORMAL_QOS);
 
     RpcScheduler scheduler = new SimpleRpcScheduler(schedConf, 3, 1, 1, priority,
                                                     HConstants.QOS_THRESHOLD);
@@ -369,14 +353,12 @@ public class TestSimpleRpcScheduler {
       when(putCallTask.getRpcCall()).thenReturn(putCall);
       when(putCall.getHeader()).thenReturn(putHead);
       when(putCall.getParam()).thenReturn(putCall.param);
-      when(putCall.getRequestUser()).thenReturn(Optional.empty());
 
       CallRunner getCallTask = mock(CallRunner.class);
       ServerCall getCall = mock(ServerCall.class);
       RequestHeader getHead = RequestHeader.newBuilder().setMethodName("get").build();
       when(getCallTask.getRpcCall()).thenReturn(getCall);
       when(getCall.getHeader()).thenReturn(getHead);
-      when(getCall.getRequestUser()).thenReturn(Optional.empty());
 
       CallRunner scanCallTask = mock(CallRunner.class);
       ServerCall scanCall = mock(ServerCall.class);
@@ -385,7 +367,6 @@ public class TestSimpleRpcScheduler {
       when(scanCallTask.getRpcCall()).thenReturn(scanCall);
       when(scanCall.getHeader()).thenReturn(scanHead);
       when(scanCall.getParam()).thenReturn(scanCall.param);
-      when(scanCall.getRequestUser()).thenReturn(Optional.empty());
 
       ArrayList<Integer> work = new ArrayList<>();
       doAnswerTaskExecution(putCallTask, work, 1, 1000);
@@ -449,8 +430,7 @@ public class TestSimpleRpcScheduler {
     schedConf.setInt("hbase.ipc.server.max.callqueue.length", 5);
 
     PriorityFunction priority = mock(PriorityFunction.class);
-    when(priority.getPriority(any(RequestHeader.class), any(Message.class),
-      any(User.class))).thenReturn(HConstants.NORMAL_QOS);
+    when(priority.getPriority(any(), any(), any())).thenReturn(HConstants.NORMAL_QOS);
     SimpleRpcScheduler scheduler = new SimpleRpcScheduler(schedConf, 0, 0, 0, priority,
       HConstants.QOS_THRESHOLD);
     try {
@@ -463,7 +443,6 @@ public class TestSimpleRpcScheduler {
       RequestHeader putHead = RequestHeader.newBuilder().setMethodName("mutate").build();
       when(putCallTask.getRpcCall()).thenReturn(putCall);
       when(putCall.getHeader()).thenReturn(putHead);
-      when(putCall.getRequestUser()).thenReturn(Optional.empty());
 
       assertTrue(scheduler.dispatch(putCallTask));
 
@@ -516,8 +495,7 @@ public class TestSimpleRpcScheduler {
     schedConf.set(RpcExecutor.CALL_QUEUE_TYPE_CONF_KEY,
       RpcExecutor.CALL_QUEUE_TYPE_CODEL_CONF_VALUE);
     PriorityFunction priority = mock(PriorityFunction.class);
-    when(priority.getPriority(any(RPCProtos.RequestHeader.class), any(Message.class),
-      any(User.class))).thenReturn(HConstants.NORMAL_QOS);
+    when(priority.getPriority(any(), any(), any())).thenReturn(HConstants.NORMAL_QOS);
     SimpleRpcScheduler scheduler =
         new SimpleRpcScheduler(schedConf, 1, 1, 1, priority, HConstants.QOS_THRESHOLD);
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
index 6215790..3dcd849 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
@@ -145,7 +145,7 @@ public class TestSplitLogManager {
 
     // By default, we let the test manage the error as before, so the server
     // does not appear as dead from the master point of view, only from the split log pov.
-    Mockito.when(sm.isServerOnline(Mockito.any(ServerName.class))).thenReturn(true);
+    Mockito.when(sm.isServerOnline(Mockito.any())).thenReturn(true);
 
     to = 12000;
     conf.setInt(HConstants.HBASE_SPLITLOG_MANAGER_TIMEOUT, to);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java
index 073216c..4e11778 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java
@@ -17,6 +17,8 @@
  */
 package org.apache.hadoop.hbase.master.assignment;
 
+import static org.mockito.ArgumentMatchers.any;
+
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Map;
@@ -55,23 +57,21 @@ import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
 import org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore;
 import org.apache.hadoop.hbase.procedure2.store.ProcedureStore;
 import org.apache.hadoop.hbase.security.Superusers;
-import org.apache.hadoop.hbase.util.FSUtils;
-import org.mockito.Mockito;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-import org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcController;
 import org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException;
 import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiResponse;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateRequest;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateResponse;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.RegionAction;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.RegionActionResult;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ResultOrException;
+import org.apache.hadoop.hbase.util.FSUtils;
+import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
 
 /**
  * A mocked master services.
@@ -136,17 +136,15 @@ public class MockMasterServices extends MockNoopMasterServices {
     MutateResponse.Builder builder = MutateResponse.newBuilder();
     builder.setProcessed(true);
     try {
-      Mockito.when(ri.mutate((RpcController)Mockito.any(), (MutateRequest)Mockito.any())).
-        thenReturn(builder.build());
+      Mockito.when(ri.mutate(any(), any())).thenReturn(builder.build());
     } catch (ServiceException se) {
       throw ProtobufUtil.handleRemoteException(se);
     }
     try {
-      Mockito.when(ri.multi((RpcController)Mockito.any(), (MultiRequest)Mockito.any())).
-        thenAnswer(new Answer<MultiResponse>() {
+      Mockito.when(ri.multi(any(), any())).thenAnswer(new Answer<MultiResponse>() {
           @Override
           public MultiResponse answer(InvocationOnMock invocation) throws Throwable {
-            return buildMultiResponse( (MultiRequest)invocation.getArguments()[1]);
+            return buildMultiResponse(invocation.getArgument(1));
           }
         });
     } catch (ServiceException se) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java
index 5c76643..566479a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java
@@ -145,7 +145,7 @@ public class TestCleanerChore {
     // touch a new file
     fs.create(file).close();
     assertTrue("Test file didn't get created.", fs.exists(file));
-    
+
     FileStatus fStat = fs.getFileStatus(parent);
     chore.chore();
     // make sure we never checked the directory
@@ -216,7 +216,7 @@ public class TestCleanerChore {
         FSUtils.logFileSystemState(fs, testDir, LOG);
         return (Boolean) invocation.callRealMethod();
       }
-    }).when(spy).isFileDeletable(Mockito.any(FileStatus.class));
+    }).when(spy).isFileDeletable(Mockito.any());
 
     // run the chore
     chore.chore();
@@ -225,7 +225,7 @@ public class TestCleanerChore {
     assertTrue("Added file unexpectedly deleted", fs.exists(addedFile));
     assertTrue("Parent directory deleted unexpectedly", fs.exists(parent));
     assertFalse("Original file unexpectedly retained", fs.exists(file));
-    Mockito.verify(spy, Mockito.times(1)).isFileDeletable(Mockito.any(FileStatus.class));
+    Mockito.verify(spy, Mockito.times(1)).isFileDeletable(Mockito.any());
     Mockito.reset(spy);
   }
 
@@ -274,7 +274,7 @@ public class TestCleanerChore {
         FSUtils.logFileSystemState(fs, testDir, LOG);
         return (Boolean) invocation.callRealMethod();
       }
-    }).when(spy).isFileDeletable(Mockito.any(FileStatus.class));
+    }).when(spy).isFileDeletable(Mockito.any());
 
     // attempt to delete the directory, which
     if (chore.checkAndDeleteDirectory(parent)) {
@@ -286,7 +286,7 @@ public class TestCleanerChore {
     assertTrue("Added file unexpectedly deleted", fs.exists(racyFile));
     assertTrue("Parent directory deleted unexpectedly", fs.exists(parent));
     assertFalse("Original file unexpectedly retained", fs.exists(file));
-    Mockito.verify(spy, Mockito.times(1)).isFileDeletable(Mockito.any(FileStatus.class));
+    Mockito.verify(spy, Mockito.times(1)).isFileDeletable(Mockito.any());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizer.java
index ab6d7d0..2af4b47 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/normalizer/TestSimpleRegionNormalizer.java
@@ -39,6 +39,8 @@ import org.apache.hadoop.hbase.client.RegionInfo;
 import org.apache.hadoop.hbase.client.RegionInfoBuilder;
 import org.apache.hadoop.hbase.master.MasterRpcServices;
 import org.apache.hadoop.hbase.master.MasterServices;
+import org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException;
+import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSplitOrMergeEnabledResponse;
 import org.apache.hadoop.hbase.testclassification.MasterTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -49,10 +51,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 import org.mockito.Mockito;
 
-import org.apache.hadoop.hbase.shaded.com.google.protobuf.RpcController;
-import org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSplitOrMergeEnabledRequest;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSplitOrMergeEnabledResponse;
 
 /**
  * Tests logic of {@link SimpleRegionNormalizer}.
@@ -353,9 +351,9 @@ public class TestSimpleRegionNormalizer {
     // for simplicity all regions are assumed to be on one server; doesn't matter to us
     ServerName sn = ServerName.valueOf("localhost", 0, 1L);
     when(masterServices.getAssignmentManager().getRegionStates().
-      getRegionsOfTable(any(TableName.class))).thenReturn(RegionInfo);
+      getRegionsOfTable(any())).thenReturn(RegionInfo);
     when(masterServices.getAssignmentManager().getRegionStates().
-      getRegionServerOfRegion(any(RegionInfo.class))).thenReturn(sn);
+      getRegionServerOfRegion(any())).thenReturn(sn);
 
     for (Map.Entry<byte[], Integer> region : regionSizes.entrySet()) {
       RegionLoad regionLoad = Mockito.mock(RegionLoad.class);
@@ -366,8 +364,8 @@ public class TestSimpleRegionNormalizer {
         getRegionsLoad().get(region.getKey())).thenReturn(regionLoad);
     }
     try {
-      when(masterRpcServices.isSplitOrMergeEnabled(any(RpcController.class),
-        any(IsSplitOrMergeEnabledRequest.class))).thenReturn(
+      when(masterRpcServices.isSplitOrMergeEnabled(any(),
+        any())).thenReturn(
           IsSplitOrMergeEnabledResponse.newBuilder().setEnabled(true).build());
     } catch (ServiceException se) {
       LOG.debug("error setting isSplitOrMergeEnabled switch", se);

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java
index fa934d9..0603b21 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java
@@ -124,7 +124,7 @@ public class TestProcedure {
     proc.completedProcedure.await();
     verify(procspy).sendGlobalBarrierReached();
     verify(procspy).sendGlobalBarrierComplete();
-    verify(procspy, never()).receive(any(ForeignException.class));
+    verify(procspy, never()).receive(any());
   }
 
   @Test(timeout = 60000)
@@ -176,7 +176,7 @@ public class TestProcedure {
     procspy.completedProcedure.await();
     verify(procspy).sendGlobalBarrierReached();
     verify(procspy).sendGlobalBarrierComplete();
-    verify(procspy, never()).receive(any(ForeignException.class));
+    verify(procspy, never()).receive(any());
   }
 
   @Test(timeout = 60000)

http://git-wip-us.apache.org/repos/asf/hbase/blob/d69570a4/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedureCoordinator.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedureCoordinator.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedureCoordinator.java
index b5a9f29..d096db7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedureCoordinator.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedureCoordinator.java
@@ -41,10 +41,10 @@ import java.util.List;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher;
+import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
 import org.apache.hadoop.hbase.testclassification.MasterTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
-import org.apache.hadoop.hbase.errorhandling.ForeignException;
-import org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher;
 import org.junit.After;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -52,8 +52,6 @@ import org.mockito.InOrder;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
-import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists;
-
 /**
  * Test Procedure coordinator operation.
  * <p>
@@ -106,7 +104,7 @@ public class TestProcedureCoordinator {
     Procedure proc2 = new Procedure(coordinator,  monitor,
         WAKE_FREQUENCY, TIMEOUT, procName +"2", procData, expected);
     Procedure procSpy2 = spy(proc2);
-    when(coordinator.createProcedure(any(ForeignExceptionDispatcher.class), eq(procName), eq(procData), anyListOf(String.class)))
+    when(coordinator.createProcedure(any(), eq(procName), eq(procData), anyListOf(String.class)))
     .thenReturn(procSpy, procSpy2);
 
     coordinator.startProcedure(procSpy.getErrorMonitor(), procName, procData, expected);
@@ -127,7 +125,7 @@ public class TestProcedureCoordinator {
         TIMEOUT, procName, procData, expected);
     final Procedure procSpy = spy(proc);
 
-    when(coordinator.createProcedure(any(ForeignExceptionDispatcher.class), eq(procName), eq(procData), anyListOf(String.class)))
+    when(coordinator.createProcedure(any(), eq(procName), eq(procData), anyListOf(String.class)))
         .thenReturn(procSpy);
 
     // use the passed controller responses
@@ -139,10 +137,10 @@ public class TestProcedureCoordinator {
     proc = coordinator.startProcedure(proc.getErrorMonitor(), procName, procData, expected);
     // and wait for it to finish
     while(!proc.completedLatch.await(WAKE_FREQUENCY, TimeUnit.MILLISECONDS));
-    verify(procSpy, atLeastOnce()).receive(any(ForeignException.class));
+    verify(procSpy, atLeastOnce()).receive(any());
     verify(coordinator, times(1)).rpcConnectionFailure(anyString(), eq(cause));
     verify(controller, times(1)).sendGlobalBarrierAcquire(procSpy, procData, expected);
-    verify(controller, never()).sendGlobalBarrierReached(any(Procedure.class),
+    verify(controller, never()).sendGlobalBarrierReached(any(),
         anyListOf(String.class));
   }
 
@@ -158,7 +156,7 @@ public class TestProcedureCoordinator {
     final Procedure spy = spy(new Procedure(coordinator,
         WAKE_FREQUENCY, TIMEOUT, procName, procData, expected));
 
-    when(coordinator.createProcedure(any(ForeignExceptionDispatcher.class), eq(procName), eq(procData), anyListOf(String.class)))
+    when(coordinator.createProcedure(any(), eq(procName), eq(procData), anyListOf(String.class)))
     .thenReturn(spy);
 
     // use the passed controller responses
@@ -171,11 +169,11 @@ public class TestProcedureCoordinator {
     Procedure task = coordinator.startProcedure(spy.getErrorMonitor(), procName, procData, expected);
     // and wait for it to finish
     while(!task.completedLatch.await(WAKE_FREQUENCY, TimeUnit.MILLISECONDS));
-    verify(spy, atLeastOnce()).receive(any(ForeignException.class));
+    verify(spy, atLeastOnce()).receive(any());
     verify(coordinator, times(1)).rpcConnectionFailure(anyString(), eq(cause));
     verify(controller, times(1)).sendGlobalBarrierAcquire(eq(spy),
         eq(procData), anyListOf(String.class));
-    verify(controller, times(1)).sendGlobalBarrierReached(any(Procedure.class),
+    verify(controller, times(1)).sendGlobalBarrierReached(any(),
         anyListOf(String.class));
   }
 
@@ -267,7 +265,7 @@ public class TestProcedureCoordinator {
   public void runCoordinatedOperation(Procedure spy, AcquireBarrierAnswer prepareOperation,
       BarrierAnswer commitOperation, String... cohort) throws Exception {
     List<String> expected = Arrays.asList(cohort);
-    when(coordinator.createProcedure(any(ForeignExceptionDispatcher.class), eq(procName), eq(procData), anyListOf(String.class)))
+    when(coordinator.createProcedure(any(), eq(procName), eq(procData), anyListOf(String.class)))
       .thenReturn(spy);
 
     // use the passed controller responses


Mime
View raw message