diff --git a/pom.xml b/pom.xml index f9912f9f..4b2f4371 100644 --- a/pom.xml +++ b/pom.xml @@ -390,7 +390,7 @@ org.mockito mockito-core - 1.8.5 + 4.11.0 test diff --git a/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java b/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java index fccb67c2..a3878632 100644 --- a/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java +++ b/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java @@ -16,8 +16,6 @@ import java.net.URL; import java.util.*; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.same; import static org.mockito.Mockito.*; public class JavaProjectBuilderTest { diff --git a/src/test/java/com/thoughtworks/qdox/builder/impl/EvaluatingVisitorTest.java b/src/test/java/com/thoughtworks/qdox/builder/impl/EvaluatingVisitorTest.java index e74d8ba5..229a7beb 100644 --- a/src/test/java/com/thoughtworks/qdox/builder/impl/EvaluatingVisitorTest.java +++ b/src/test/java/com/thoughtworks/qdox/builder/impl/EvaluatingVisitorTest.java @@ -12,7 +12,7 @@ import java.util.Collections; import java.util.List; -import static org.mockito.Matchers.any; +import static org.mockito.Mockito.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/src/test/java/com/thoughtworks/qdox/parser/ParserTest.java b/src/test/java/com/thoughtworks/qdox/parser/ParserTest.java index 154f0a05..6e43cfea 100644 --- a/src/test/java/com/thoughtworks/qdox/parser/ParserTest.java +++ b/src/test/java/com/thoughtworks/qdox/parser/ParserTest.java @@ -9,12 +9,12 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; -import org.mockito.stubbing.answers.ReturnsElementsOf; import java.util.Collection; import java.util.LinkedList; import static org.mockito.Mockito.*; +import static org.mockito.AdditionalAnswers.returnsElementsOf; public class ParserTest { @@ -3137,9 +3137,9 @@ private void setupLex( int token ) throws Exception setupLex( token, null ); if ( token == 0 ) { - when( lexer.lex() ).thenAnswer( new ReturnsElementsOf( lexValues ) ); - when( lexer.text() ).thenAnswer( new ReturnsElementsOf( textValues ) ); - when( lexer.getCodeBody() ).thenAnswer( new ReturnsElementsOf( codeBodyValues ) ); + when( lexer.lex() ).thenAnswer( returnsElementsOf( lexValues ) ); + when( lexer.text() ).thenAnswer( returnsElementsOf( textValues ) ); + when( lexer.getCodeBody() ).thenAnswer( returnsElementsOf( codeBodyValues ) ); when( lexer.getLine() ).thenReturn( -1 ); } } diff --git a/src/test/java/com/thoughtworks/qdox/parser/impl/DefaultJavaCommentParserTest.java b/src/test/java/com/thoughtworks/qdox/parser/impl/DefaultJavaCommentParserTest.java index a7f500d4..47b1dd8f 100644 --- a/src/test/java/com/thoughtworks/qdox/parser/impl/DefaultJavaCommentParserTest.java +++ b/src/test/java/com/thoughtworks/qdox/parser/impl/DefaultJavaCommentParserTest.java @@ -7,13 +7,13 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; -import org.mockito.stubbing.answers.ReturnsElementsOf; import java.io.IOException; import java.util.Collection; import java.util.LinkedList; import static org.mockito.Mockito.*; +import static org.mockito.AdditionalAnswers.returnsElementsOf; public class DefaultJavaCommentParserTest { @@ -208,8 +208,8 @@ private void setupLex(int token) throws IOException { setupLex(token, null); if( token == 0) { - when( lexer.lex() ).thenAnswer( new ReturnsElementsOf( lexValues ) ); - when( lexer.text() ).thenAnswer( new ReturnsElementsOf( textValues ) ); + when( lexer.lex() ).thenAnswer( returnsElementsOf( lexValues ) ); + when( lexer.text() ).thenAnswer( returnsElementsOf( textValues ) ); when( lexer.getLine() ).thenReturn( -1 ); } }