diff --git a/src/test/java/com/jcabi/http/RequestTimeoutLossTest.java b/src/test/java/com/jcabi/http/RequestTimeoutLossTest.java index 4d9eedbe..27498a10 100644 --- a/src/test/java/com/jcabi/http/RequestTimeoutLossTest.java +++ b/src/test/java/com/jcabi/http/RequestTimeoutLossTest.java @@ -318,7 +318,7 @@ public Collection> get() { ArgumentMatchers.any(InputStream.class), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt(), - ArgumentMatchers.any(SSLContext.class) + ArgumentMatchers.isNull() ) ).thenReturn(response); new BaseRequest(original, url).through(wire).fetch(); @@ -330,7 +330,7 @@ public Collection> get() { ArgumentMatchers.any(InputStream.class), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt(), - ArgumentMatchers.any(SSLContext.class) + ArgumentMatchers.isNull() ); Mockito.verify(wire).send( ArgumentMatchers.any(Request.class), @@ -340,7 +340,7 @@ public Collection> get() { ArgumentMatchers.any(InputStream.class), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt(), - ArgumentMatchers.any(SSLContext.class) + ArgumentMatchers.isNull() ); } @@ -360,30 +360,28 @@ private void testTimeoutOrderDoesntMatter(final Callable exec) .forClass(Integer.class); final ArgumentCaptor rdc = ArgumentCaptor .forClass(Integer.class); - MockWire.setMockDelegate(wire); final Response response = Mockito.mock(Response.class); - Mockito.when( - wire.send( - Mockito.any(Request.class), - Mockito.anyString(), - Mockito.anyString(), - Mockito.>anyCollection(), - Mockito.any(InputStream.class), - Mockito.anyInt(), - Mockito.anyInt(), - ArgumentMatchers.any(SSLContext.class) - ) - ).thenReturn(response); + Mockito.doReturn(response).when(wire).send( + ArgumentMatchers.any(Request.class), + ArgumentMatchers.anyString(), + ArgumentMatchers.anyString(), + ArgumentMatchers.>anyCollection(), + ArgumentMatchers.any(InputStream.class), + ArgumentMatchers.anyInt(), + ArgumentMatchers.anyInt(), + ArgumentMatchers.isNull() + ); + MockWire.setMockDelegate(wire); exec.call(); Mockito.verify(wire).send( - Mockito.any(Request.class), - Mockito.anyString(), - Mockito.anyString(), - Mockito.>anyCollection(), - Mockito.any(InputStream.class), + ArgumentMatchers.any(Request.class), + ArgumentMatchers.anyString(), + ArgumentMatchers.anyString(), + ArgumentMatchers.>anyCollection(), + ArgumentMatchers.any(InputStream.class), cnc.capture(), rdc.capture(), - ArgumentMatchers.any(SSLContext.class) + ArgumentMatchers.isNull() ); MatcherAssert.assertThat( cnc.getValue().intValue(),