Revert "CAMEL-11869: Adopted mockito-core 2.10.0 except for camel-core"

This reverts commit d4d5ad3764aca3a28409cab2380d1dd88da45a18.


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

Branch: refs/heads/master
Commit: 12e2c2c17a84f86f35d700860bd57c11fabf8815
Parents: 409015f
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Oct 3 17:01:04 2017 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Oct 3 17:01:04 2017 +0200

----------------------------------------------------------------------
 camel-core/pom.xml                                  |  1 -
 components/camel-caffeine/pom.xml                   | 12 ++++++++++++
 components/camel-chronicle/pom.xml                  | 12 ++++++++++++
 components/camel-consul/pom.xml                     | 12 ++++++++++++
 .../xml/AbstractCamelContextFactoryBeanTest.java    |  2 +-
 components/camel-digitalocean/pom.xml               |  5 +++++
 components/camel-ehcache/pom.xml                    | 12 ++++++++++++
 components/camel-gora/pom.xml                       |  3 ++-
 components/camel-infinispan/pom.xml                 |  6 ++++++
 components/camel-irc/pom.xml                        |  3 ++-
 components/camel-jcache/pom.xml                     |  6 ++++++
 .../camel/component/metrics/GaugeProducerTest.java  | 12 ++++++------
 .../camel/component/metrics/GaugeRouteTest.java     | 16 ++++++++--------
 components/camel-mongodb/pom.xml                    |  3 ++-
 components/camel-printer/pom.xml                    |  3 ++-
 components/camel-reactive-streams/pom.xml           |  8 +++++++-
 components/camel-reactor/pom.xml                    |  6 ++++++
 .../camel-servicenow-component/pom.xml              | 12 ++++++++++++
 components/camel-spark-rest/pom.xml                 |  3 ++-
 components/camel-telegram/pom.xml                   |  3 ++-
 parent/pom.xml                                      |  2 +-
 21 files changed, 118 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/camel-core/pom.xml
----------------------------------------------------------------------
diff --git a/camel-core/pom.xml b/camel-core/pom.xml
index eea6780..4138db0 100644
--- a/camel-core/pom.xml
+++ b/camel-core/pom.xml
@@ -193,7 +193,6 @@
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
-      <version>1.10.19</version>
       <scope>test</scope>
     </dependency>
 

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-caffeine/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-caffeine/pom.xml 
b/components/camel-caffeine/pom.xml
index d0a9f6d..d8a133e 100644
--- a/components/camel-caffeine/pom.xml
+++ b/components/camel-caffeine/pom.xml
@@ -79,6 +79,18 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>java-hamcrest</artifactId>
+      <version>${hamcrest-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>io.dropwizard.metrics</groupId>
       <artifactId>metrics-core</artifactId>
       <version>${metrics-version}</version>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-chronicle/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-chronicle/pom.xml 
b/components/camel-chronicle/pom.xml
index dd6888e..2f97815 100644
--- a/components/camel-chronicle/pom.xml
+++ b/components/camel-chronicle/pom.xml
@@ -76,6 +76,18 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>java-hamcrest</artifactId>
+      <version>${hamcrest-version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   
   <profiles>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-consul/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-consul/pom.xml b/components/camel-consul/pom.xml
index d2cfac0..cbe3a26 100644
--- a/components/camel-consul/pom.xml
+++ b/components/camel-consul/pom.xml
@@ -94,6 +94,18 @@
       <artifactId>log4j-slf4j-impl</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>java-hamcrest</artifactId>
+      <version>${hamcrest-version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
 
b/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
index e2c59c9..bcccfca 100644
--- 
a/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
+++ 
b/components/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
@@ -83,7 +83,7 @@ public class AbstractCamelContextFactoryBeanTest {
 
         // program the property resolution in context mock
         
when(context.resolvePropertyPlaceholders(anyString())).thenAnswer(invocation -> 
{
-            final String placeholder = invocation.getArgument(0);
+            final String placeholder = invocation.getArgumentAt(0, 
String.class);
 
             // we receive the argument and check if the method should return a
             // value that can be converted to boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-digitalocean/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/pom.xml 
b/components/camel-digitalocean/pom.xml
index 20f469d..f8005fb 100644
--- a/components/camel-digitalocean/pom.xml
+++ b/components/camel-digitalocean/pom.xml
@@ -75,6 +75,11 @@
       <artifactId>camel-test</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
+    </dependency>
   </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-ehcache/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-ehcache/pom.xml b/components/camel-ehcache/pom.xml
index 459428b..ec50976 100644
--- a/components/camel-ehcache/pom.xml
+++ b/components/camel-ehcache/pom.xml
@@ -78,6 +78,18 @@
       <artifactId>log4j-slf4j-impl</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>java-hamcrest</artifactId>
+      <version>${hamcrest-version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-gora/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-gora/pom.xml b/components/camel-gora/pom.xml
index 52e71f0..0ba69df 100644
--- a/components/camel-gora/pom.xml
+++ b/components/camel-gora/pom.xml
@@ -72,7 +72,8 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-infinispan/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-infinispan/pom.xml 
b/components/camel-infinispan/pom.xml
index 9bcf4a4..cd243a4 100644
--- a/components/camel-infinispan/pom.xml
+++ b/components/camel-infinispan/pom.xml
@@ -151,6 +151,12 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>${mockito-version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <!-- unit testing requires java 8 -->

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-irc/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-irc/pom.xml b/components/camel-irc/pom.xml
index 90127ba..9a27b47 100644
--- a/components/camel-irc/pom.xml
+++ b/components/camel-irc/pom.xml
@@ -74,7 +74,8 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-jcache/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-jcache/pom.xml b/components/camel-jcache/pom.xml
index e7eeb21..c2cb706 100644
--- a/components/camel-jcache/pom.xml
+++ b/components/camel-jcache/pom.xml
@@ -96,6 +96,12 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.hamcrest</groupId>
       <artifactId>java-hamcrest</artifactId>
       <version>${hamcrest-version}</version>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
 
b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
index 123747b..6fd3b92 100644
--- 
a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
+++ 
b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeProducerTest.java
@@ -76,8 +76,8 @@ public class GaugeProducerTest {
     public void testDefault() throws Exception {
         verify(registry, times(1)).register(eq(METRICS_NAME), argThat(new 
ArgumentMatcher<CamelMetricsGauge>() {
             @Override
-            public boolean matches(CamelMetricsGauge argument) {
-                return VALUE.equals(argument.getValue());
+            public boolean matches(Object argument) {
+                return argument instanceof CamelMetricsGauge && 
VALUE.equals(((CamelMetricsGauge)argument).getValue());
             }
         }));
     }
@@ -89,14 +89,14 @@ public class GaugeProducerTest {
         verify(in, times(1)).getHeader(HEADER_GAUGE_SUBJECT, Object.class);
         verify(registry, times(1)).register(eq(METRICS_NAME), argThat(new 
ArgumentMatcher<CamelMetricsGauge>() {
             @Override
-            public boolean matches(CamelMetricsGauge argument) {
-                return VALUE.equals(argument.getValue());
+            public boolean matches(Object argument) {
+                return argument instanceof CamelMetricsGauge && 
VALUE.equals(((CamelMetricsGauge)argument).getValue());
             }
         }));
         verify(registry, times(1)).register(eq(METRICS_NAME_HEADER), 
argThat(new ArgumentMatcher<CamelMetricsGauge>() {
             @Override
-            public boolean matches(CamelMetricsGauge argument) {
-                return VALUE_HEADER.equals(argument.getValue());
+            public boolean matches(Object argument) {
+                return argument instanceof CamelMetricsGauge && 
VALUE_HEADER.equals(((CamelMetricsGauge)argument).getValue());
             }
         }));
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
 
b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
index 79d9380..4a03ebf 100644
--- 
a/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
+++ 
b/components/camel-metrics/src/test/java/org/apache/camel/component/metrics/GaugeRouteTest.java
@@ -105,8 +105,8 @@ public class GaugeRouteTest {
                     new Answer<CamelMetricsGauge>() {
                         @Override
                         public CamelMetricsGauge answer(InvocationOnMock 
invocation) throws Throwable {
-                            mockGauges.put(invocation.getArgument(0), 
invocation.getArgument(1));
-                            return invocation.getArgument(1);
+                            mockGauges.put(invocation.getArgumentAt(0, 
String.class), invocation.getArgumentAt(1, CamelMetricsGauge.class));
+                            return invocation.getArgumentAt(1, 
CamelMetricsGauge.class);
                         }
                     });
             return registry;
@@ -137,8 +137,8 @@ public class GaugeRouteTest {
         endpoint.assertIsSatisfied();
         verify(mockRegistry, times(1)).register(eq("A"), argThat(new 
ArgumentMatcher<CamelMetricsGauge>() {
             @Override
-            public boolean matches(CamelMetricsGauge argument) {
-                return "my subject".equals(argument.getValue());
+            public boolean matches(Object argument) {
+                return argument instanceof CamelMetricsGauge && "my 
subject".equals(((CamelMetricsGauge)argument).getValue());
             }
         }));
     }
@@ -147,8 +147,8 @@ public class GaugeRouteTest {
     public void testOverride() throws Exception {
         verify(mockRegistry, times(1)).register(eq("A"), argThat(new 
ArgumentMatcher<CamelMetricsGauge>() {
             @Override
-            public boolean matches(CamelMetricsGauge argument) {
-                return "my subject".equals(argument.getValue());
+            public boolean matches(Object argument) {
+                return argument instanceof CamelMetricsGauge && "my 
subject".equals(((CamelMetricsGauge)argument).getValue());
             }
         }));
         endpoint.expectedMessageCount(1);
@@ -156,8 +156,8 @@ public class GaugeRouteTest {
         endpoint.assertIsSatisfied();
         verify(mockRegistry, times(1)).register(eq("B"), argThat(new 
ArgumentMatcher<CamelMetricsGauge>() {
             @Override
-            public boolean matches(CamelMetricsGauge argument) {
-                return "my overriding subject".equals(argument.getValue());
+            public boolean matches(Object argument) {
+                return argument instanceof CamelMetricsGauge && "my overriding 
subject".equals(((CamelMetricsGauge)argument).getValue());
             }
         }));
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-mongodb/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-mongodb/pom.xml b/components/camel-mongodb/pom.xml
index ba156fa..ac4a728 100644
--- a/components/camel-mongodb/pom.xml
+++ b/components/camel-mongodb/pom.xml
@@ -84,7 +84,8 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-printer/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-printer/pom.xml b/components/camel-printer/pom.xml
index 223cde9..af22695 100644
--- a/components/camel-printer/pom.xml
+++ b/components/camel-printer/pom.xml
@@ -56,7 +56,8 @@
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
+            <artifactId>mockito-all</artifactId>
+            <version>${mockito-version}</version>
             <scope>test</scope>
         </dependency>   
         <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-reactive-streams/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-reactive-streams/pom.xml 
b/components/camel-reactive-streams/pom.xml
index 5a0d009..98f127a 100644
--- a/components/camel-reactive-streams/pom.xml
+++ b/components/camel-reactive-streams/pom.xml
@@ -94,6 +94,12 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>${mockito-version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-reactor/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-reactor/pom.xml b/components/camel-reactor/pom.xml
index 464a0f2..90f0020 100644
--- a/components/camel-reactor/pom.xml
+++ b/components/camel-reactor/pom.xml
@@ -86,6 +86,12 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>${mockito-version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-servicenow/camel-servicenow-component/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/camel-servicenow-component/pom.xml 
b/components/camel-servicenow/camel-servicenow-component/pom.xml
index 2e550eb..6aa16a9 100644
--- a/components/camel-servicenow/camel-servicenow-component/pom.xml
+++ b/components/camel-servicenow/camel-servicenow-component/pom.xml
@@ -148,6 +148,18 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>java-hamcrest</artifactId>
+      <version>${hamcrest-version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-spark-rest/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spark-rest/pom.xml 
b/components/camel-spark-rest/pom.xml
index 3396450..52d190a 100644
--- a/components/camel-spark-rest/pom.xml
+++ b/components/camel-spark-rest/pom.xml
@@ -104,7 +104,8 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
       <scope>test</scope>
     </dependency>
 

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/components/camel-telegram/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-telegram/pom.xml 
b/components/camel-telegram/pom.xml
index ef718dd..ca03f17 100644
--- a/components/camel-telegram/pom.xml
+++ b/components/camel-telegram/pom.xml
@@ -83,7 +83,8 @@
     </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
+      <artifactId>mockito-all</artifactId>
+      <version>${mockito-version}</version>
       <scope>test</scope>
     </dependency>  
     <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/12e2c2c1/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 55f1787..600d38d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -499,7 +499,7 @@
     <minimal-json-version>0.9.4</minimal-json-version>
     <mock-javamail-version>1.9</mock-javamail-version>
     <mockwebserver-version>0.0.15</mockwebserver-version>
-    <mockito-version>2.10.0</mockito-version>
+    <mockito-version>1.10.19</mockito-version>
     <mongo-java-driver-version>3.5.0</mongo-java-driver-version>
     <mongo-java-driver32-version>3.2.2</mongo-java-driver32-version>
     <mongo-hadoop-version>1.5.0</mongo-hadoop-version>

Reply via email to