You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2023/01/05 12:22:40 UTC

[jackrabbit-oak] branch 1.22 updated: OAK-10016: avoid use of deprecated Mockito methods (removed in 4.*) (#775)

This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
     new e072cb542c OAK-10016: avoid use of deprecated Mockito methods (removed in 4.*) (#775)
e072cb542c is described below

commit e072cb542ce313c9980d6d257c7fd3e473c1ad71
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Nov 30 19:17:23 2022 +0100

    OAK-10016: avoid use of deprecated Mockito methods (removed in 4.*) (#775)
---
 .../blob/datastore/DataStoreBlobStoreTest.java     |  2 +-
 .../plugins/index/IndexInfoServiceImplTest.java    |  2 +-
 .../progress/NodeCounterMBeanEstimatorTest.java    |  2 +-
 .../CompositeAccessControlManagerTest.java         |  8 +++---
 ...e.jackrabbit.oak.jcr.osgi.RepositoryManager.cfg | 30 ++++++++++----------
 ...krabbit.oak.segment.SegmentNodeStoreService.cfg | 32 +++++++++++-----------
 .../oak/plugins/index/lucene/IndexTrackerTest.java |  2 +-
 .../lucene/hybrid/ExternalIndexObserverTest.java   | 20 +++++++-------
 .../hybrid/LuceneJournalPropertyBuilderTest.java   |  2 +-
 .../oak/run/cli/DocumentFixtureTest.java           |  2 +-
 .../oak/run/cli/SegmentTarFixtureTest.java         |  2 +-
 .../index/mt/MTFulltextQueryTermsProviderTest.java |  2 +-
 .../index/search/ExtractedTextCacheTest.java       |  8 +++---
 .../oak/segment/ExternalBlobReferenceTest.java     |  2 +-
 .../jackrabbit/oak/segment/SegmentParserTest.java  |  2 +-
 .../oak/segment/file/proc/ReferencesNodeTest.java  |  2 +-
 .../index/solr/query/SolrQueryIndexTest.java       |  2 +-
 17 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreTest.java b/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreTest.java
index 979819bb56..1b0f80ce6c 100644
--- a/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreTest.java
+++ b/oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreTest.java
@@ -53,7 +53,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
diff --git a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoServiceImplTest.java b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoServiceImplTest.java
index 1e65bd75bd..5f1a74b794 100644
--- a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoServiceImplTest.java
+++ b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexInfoServiceImplTest.java
@@ -35,7 +35,7 @@ import org.junit.Rule;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/progress/NodeCounterMBeanEstimatorTest.java b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/progress/NodeCounterMBeanEstimatorTest.java
index 88ca7e51cf..a9e778c630 100644
--- a/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/progress/NodeCounterMBeanEstimatorTest.java
+++ b/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/progress/NodeCounterMBeanEstimatorTest.java
@@ -36,7 +36,7 @@ import static java.util.Arrays.asList;
 import static org.apache.jackrabbit.oak.spi.filter.PathFilter.PROP_EXCLUDED_PATHS;
 import static org.apache.jackrabbit.oak.spi.filter.PathFilter.PROP_INCLUDED_PATHS;
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git a/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManagerTest.java b/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManagerTest.java
index c54891e561..2baef9f33f 100644
--- a/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManagerTest.java
+++ b/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/composite/CompositeAccessControlManagerTest.java
@@ -60,7 +60,7 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
 import static org.mockito.Mockito.when;
 import static org.mockito.Mockito.withSettings;
 
@@ -317,7 +317,7 @@ public class CompositeAccessControlManagerTest extends AbstractSecurityTest {
         JackrabbitAccessControlPolicy[] applicable = composite.getApplicablePolicies(EveryonePrincipal.getInstance());
         assertEquals(0, applicable.length);
 
-        verifyZeroInteractions(mgr);
+        verifyNoInteractions(mgr);
     }
 
     @Test
@@ -340,7 +340,7 @@ public class CompositeAccessControlManagerTest extends AbstractSecurityTest {
         CompositeAccessControlManager composite = createComposite(mgr);
         assertEquals(0, composite.getPolicies(EveryonePrincipal.getInstance()).length);
 
-        verifyZeroInteractions(mgr);
+        verifyNoInteractions(mgr);
     }
 
     @Test
@@ -375,7 +375,7 @@ public class CompositeAccessControlManagerTest extends AbstractSecurityTest {
         CompositeAccessControlManager composite = createComposite(mgr);
         assertEquals(0, composite.getEffectivePolicies(principalSet).length);
 
-        verifyZeroInteractions(mgr);
+        verifyNoInteractions(mgr);
     }
 
     @Test
diff --git a/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.jcr.osgi.RepositoryManager.cfg b/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.jcr.osgi.RepositoryManager.cfg
index 9de8f50d9c..f8181f92fb 100644
--- a/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.jcr.osgi.RepositoryManager.cfg
+++ b/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.jcr.osgi.RepositoryManager.cfg
@@ -1,15 +1,15 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding 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
-# limitations under the License.
-#Empty config to trigger default setup
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding 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
+# limitations under the License.
+#Empty config to trigger default setup
diff --git a/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.cfg b/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.cfg
index d05269419a..ccc6a4fde9 100644
--- a/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.cfg
+++ b/oak-it-osgi/src/test/config/org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.cfg
@@ -1,16 +1,16 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding 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
-# limitations under the License.
-name=Oak
-repository.home=target/tarmk
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding 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
+# limitations under the License.
+name=Oak
+repository.home=target/tarmk
diff --git a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTrackerTest.java b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTrackerTest.java
index 12271c58c6..681924cea0 100644
--- a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTrackerTest.java
+++ b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexTrackerTest.java
@@ -50,7 +50,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserverTest.java b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserverTest.java
index c6edbde874..11f8b3b786 100644
--- a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserverTest.java
+++ b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/ExternalIndexObserverTest.java
@@ -42,9 +42,9 @@ import org.mockito.junit.MockitoRule;
 import static org.apache.jackrabbit.oak.InitialContentHelper.INITIAL_CONTENT;
 import static org.apache.jackrabbit.oak.stats.StatisticsProvider.NOOP;
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
 import static org.mockito.Mockito.when;
 
 public class ExternalIndexObserverTest {
@@ -69,20 +69,20 @@ public class ExternalIndexObserverTest {
     @Test
     public void internalChange() throws Exception {
         observer.contentChanged(INITIAL_CONTENT, CommitInfo.EMPTY);
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
     public void externalChangeNullContext() throws Exception {
         observer.contentChanged(INITIAL_CONTENT, CommitInfo.EMPTY_EXTERNAL);
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
     public void emptyCommitContext() throws Exception {
         CommitInfo ci = newCommitInfo();
         observer.contentChanged(INITIAL_CONTENT, ci);
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
@@ -95,7 +95,7 @@ public class ExternalIndexObserverTest {
         CommitInfo ci = newCommitInfo();
 
         observer.contentChanged(INITIAL_CONTENT, ci);
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
@@ -108,7 +108,7 @@ public class ExternalIndexObserverTest {
         CommitInfo ci = newCommitInfo();
         when(tracker.getIndexDefinition("/oak:index/foo")).thenReturn(createNRTIndex("nt:base"));
         observer.contentChanged(INITIAL_CONTENT, ci);
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
@@ -126,7 +126,7 @@ public class ExternalIndexObserverTest {
         nb.child("a");
         observer.contentChanged(nb.getNodeState(), ci);
 
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
@@ -144,7 +144,7 @@ public class ExternalIndexObserverTest {
         nb.child("a");
         observer.contentChanged(nb.getNodeState(), ci);
 
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
@@ -178,7 +178,7 @@ public class ExternalIndexObserverTest {
                 new ExternalObserverBuilder(queue, tracker,NOOP, MoreExecutors.sameThreadExecutor(), 10);
         Observer o = builder.build();
         o.contentChanged(INITIAL_CONTENT, CommitInfo.EMPTY_EXTERNAL);
-        verifyZeroInteractions(queue);
+        verifyNoInteractions(queue);
     }
 
     @Test
diff --git a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LuceneJournalPropertyBuilderTest.java b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LuceneJournalPropertyBuilderTest.java
index 3230d70077..45006775f4 100644
--- a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LuceneJournalPropertyBuilderTest.java
+++ b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LuceneJournalPropertyBuilderTest.java
@@ -28,7 +28,7 @@ import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git a/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/DocumentFixtureTest.java b/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/DocumentFixtureTest.java
index c25c1545eb..63350fb9f9 100644
--- a/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/DocumentFixtureTest.java
+++ b/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/DocumentFixtureTest.java
@@ -38,7 +38,7 @@ import org.junit.Test;
 import static java.util.Collections.emptyMap;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
diff --git a/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/SegmentTarFixtureTest.java b/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/SegmentTarFixtureTest.java
index fc00d1e0d8..1b11cf41d4 100644
--- a/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/SegmentTarFixtureTest.java
+++ b/oak-run-commons/src/test/java/org/apache/jackrabbit/oak/run/cli/SegmentTarFixtureTest.java
@@ -20,7 +20,7 @@ package org.apache.jackrabbit.oak.run.cli;
 
 import static java.util.Collections.emptyMap;
 import static org.apache.jackrabbit.oak.segment.file.FileStoreBuilder.fileStoreBuilder;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
diff --git a/oak-search-mt/src/test/java/org/apache/jackrabbit/oak/plugins/index/mt/MTFulltextQueryTermsProviderTest.java b/oak-search-mt/src/test/java/org/apache/jackrabbit/oak/plugins/index/mt/MTFulltextQueryTermsProviderTest.java
index 66503f3d61..0b822c0cb9 100644
--- a/oak-search-mt/src/test/java/org/apache/jackrabbit/oak/plugins/index/mt/MTFulltextQueryTermsProviderTest.java
+++ b/oak-search-mt/src/test/java/org/apache/jackrabbit/oak/plugins/index/mt/MTFulltextQueryTermsProviderTest.java
@@ -32,7 +32,7 @@ import org.apache.joshua.decoder.segment_file.Sentence;
 import org.apache.lucene.analysis.Analyzer;
 import org.junit.Test;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/ExtractedTextCacheTest.java b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/ExtractedTextCacheTest.java
index aafff295a7..c4ab7301ba 100644
--- a/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/ExtractedTextCacheTest.java
+++ b/oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/ExtractedTextCacheTest.java
@@ -37,10 +37,10 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-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.Mockito.mock;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
 import static org.mockito.Mockito.when;
 
 public class ExtractedTextCacheTest {
@@ -113,7 +113,7 @@ public class ExtractedTextCacheTest {
         String text = cache.get("/a", "foo", b, false);
         assertNull(text);
 
-        verifyZeroInteractions(provider);
+        verifyNoInteractions(provider);
     }
 
     @Test
diff --git a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobReferenceTest.java b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobReferenceTest.java
index 8fde1f6d8d..164da38f83 100644
--- a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobReferenceTest.java
+++ b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/ExternalBlobReferenceTest.java
@@ -21,7 +21,7 @@ package org.apache.jackrabbit.oak.segment;
 
 import static org.apache.jackrabbit.oak.segment.file.FileStoreBuilder.fileStoreBuilder;
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
diff --git a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentParserTest.java b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentParserTest.java
index ba340181b4..7ba79c6fec 100644
--- a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentParserTest.java
+++ b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/SegmentParserTest.java
@@ -39,7 +39,7 @@ import static org.apache.jackrabbit.oak.segment.TestUtils.newRecordId;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/proc/ReferencesNodeTest.java b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/proc/ReferencesNodeTest.java
index ff8de3fb71..c5460e4979 100644
--- a/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/proc/ReferencesNodeTest.java
+++ b/oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/file/proc/ReferencesNodeTest.java
@@ -21,7 +21,7 @@ package org.apache.jackrabbit.oak.segment.file.proc;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
diff --git a/oak-solr-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndexTest.java b/oak-solr-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndexTest.java
index a5ff03761f..55e0d5fade 100644
--- a/oak-solr-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndexTest.java
+++ b/oak-solr-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndexTest.java
@@ -52,7 +52,7 @@ import org.junit.Test;
 import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
 import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
 import static org.junit.Assert.*;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;