diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-10-18 15:19:59 +0200 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-10-18 15:19:59 +0200 |
commit | 579754fa5b5f4768a75fc3aed08f70ffb29db0e3 (patch) | |
tree | 825e5366b8253535bb9366722006ef49c6e83c53 /vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/v3/FeedTesterV3.java | |
parent | 19ab63311c9354db919a9a9ac38d34342e1ca204 (diff) |
Use mockito-core 3.1.0
Diffstat (limited to 'vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/v3/FeedTesterV3.java')
-rw-r--r-- | vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/v3/FeedTesterV3.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/v3/FeedTesterV3.java b/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/v3/FeedTesterV3.java index 6452dafc38c..1677c95a54a 100644 --- a/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/v3/FeedTesterV3.java +++ b/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/v3/FeedTesterV3.java @@ -26,7 +26,6 @@ import com.yahoo.vespa.http.server.FeedHandlerV3; import com.yahoo.vespa.http.server.MetricNames; import com.yahoo.vespa.http.server.ReplyContext; import org.junit.Test; -import org.mockito.Mockito; import org.mockito.stubbing.Answer; import java.io.ByteArrayInputStream; @@ -38,7 +37,7 @@ import java.util.concurrent.Executors; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.startsWith; import static org.junit.Assert.assertThat; -import static org.mockito.Matchers.anyObject; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -131,7 +130,7 @@ public class FeedTesterV3 { SharedSourceSession sharedSourceSession = mock(SharedSourceSession.class); try { - Mockito.stub(sharedSourceSession.sendMessageBlocking(anyObject())).toAnswer((Answer<?>) invocation -> { + when(sharedSourceSession.sendMessageBlocking(any())).thenAnswer((Answer<?>) invocation -> { Object[] args = invocation.getArguments(); PutDocumentMessage putDocumentMessage = (PutDocumentMessage) args[0]; ReplyContext replyContext = (ReplyContext)putDocumentMessage.getContext(); |