diff --git a/aws/pom.xml b/aws/pom.xml index 176ecaa40d..26bc0c8037 100644 --- a/aws/pom.xml +++ b/aws/pom.xml @@ -137,7 +137,7 @@ 1.1.0 2.8.0 1.11.290 - 2.8.9 + 2.21.0 3.8.0 1.11.86 https://s3-us-west-2.amazonaws.com/dynamodb-local/release diff --git a/ethereum/pom.xml b/ethereum/pom.xml index f07ed2c6a0..434898635f 100644 --- a/ethereum/pom.xml +++ b/ethereum/pom.xml @@ -213,7 +213,7 @@ 3.3.1 5.0.5.RELEASE 1.5.6.RELEASE - 1.10.19 + 2.21.0 2.5.0 1.3 2.9.3 diff --git a/javax-servlets/pom.xml b/javax-servlets/pom.xml index afee807428..7b4eecd880 100644 --- a/javax-servlets/pom.xml +++ b/javax-servlets/pom.xml @@ -84,7 +84,7 @@ 5.0.5.RELEASE 2.8.2 3.9.1 - 2.18.3 + 2.21.0 1.3.3 2.6 4.0.1 diff --git a/pom.xml b/pom.xml index db3bef7fda..5a46ae2b19 100644 --- a/pom.xml +++ b/pom.xml @@ -1238,7 +1238,7 @@ 4.12 1.3 - 2.8.9 + 2.21.0 1.7.21 1.1.7 diff --git a/spring-core/pom.xml b/spring-core/pom.xml index 9e885462f3..60f3262f08 100644 --- a/spring-core/pom.xml +++ b/spring-core/pom.xml @@ -16,11 +16,6 @@ - - org.mockito - mockito-all - ${mockito.version} - org.springframework spring-test @@ -82,15 +77,7 @@ - - - java.net - https://maven.java.net/content/repositories/releases/ - - - - 1.10.19 1.4.4.RELEASE 1 20.0 diff --git a/spring-mockito/pom.xml b/spring-mockito/pom.xml index 6aeaa9a1e8..d1fa7f410e 100644 --- a/spring-mockito/pom.xml +++ b/spring-mockito/pom.xml @@ -24,13 +24,13 @@ org.mockito - mockito-all + mockito-core ${mockito.version} - 1.10.19 + 2.21.0 diff --git a/spring-mockito/src/main/java/com/baeldung/domain/util/MessageMatcher.java b/spring-mockito/src/main/java/com/baeldung/domain/util/MessageMatcher.java index 05cb43e4df..51db07fde7 100644 --- a/spring-mockito/src/main/java/com/baeldung/domain/util/MessageMatcher.java +++ b/spring-mockito/src/main/java/com/baeldung/domain/util/MessageMatcher.java @@ -3,7 +3,7 @@ package com.baeldung.domain.util; import com.baeldung.domain.model.Message; import org.mockito.ArgumentMatcher; -public class MessageMatcher extends ArgumentMatcher { +public class MessageMatcher implements ArgumentMatcher { private Message left; @@ -12,16 +12,11 @@ public class MessageMatcher extends ArgumentMatcher { } @Override - public boolean matches(Object object) { - if (object instanceof Message) { - Message right = (Message) object; - return left.getFrom().equals(right.getFrom()) && - left.getTo().equals(right.getTo()) && - left.getText().equals(right.getText()) && - right.getDate() != null && - right.getId() != null; - } - - return false; + public boolean matches(Message right) { + return left.getFrom().equals(right.getFrom()) && + left.getTo().equals(right.getTo()) && + left.getText().equals(right.getText()) && + right.getDate() != null && + right.getId() != null; } } \ No newline at end of file diff --git a/testing-modules/mockito-2/pom.xml b/testing-modules/mockito-2/pom.xml index 4b7dc70155..cab4d7977b 100644 --- a/testing-modules/mockito-2/pom.xml +++ b/testing-modules/mockito-2/pom.xml @@ -15,6 +15,6 @@ - 2.8.9 + 2.21.0 diff --git a/testing-modules/mocks/mock-comparisons/pom.xml b/testing-modules/mocks/mock-comparisons/pom.xml index 9424757a7a..df54db0c70 100644 --- a/testing-modules/mocks/mock-comparisons/pom.xml +++ b/testing-modules/mocks/mock-comparisons/pom.xml @@ -46,7 +46,7 @@ - 2.9.0 + 2.21.0 3.5.1 1.34 diff --git a/testing-modules/test-containers/pom.xml b/testing-modules/test-containers/pom.xml index 0ace187555..1f4c483988 100644 --- a/testing-modules/test-containers/pom.xml +++ b/testing-modules/test-containers/pom.xml @@ -104,7 +104,7 @@ 4.12.1 2.8.2 1.4.196 - 2.11.0 + 2.21.0 5.0.1.RELEASE 1.7.2 42.2.2