diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index e69de29..ed55975 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,26 @@ +/httpcomponents-core-4.1-src.tar.gz +/httpcomponents-core-4.1.1-src.tar.gz +/httpcomponents-core-4.1.2-src.tar.gz +/httpcomponents-core-4.1.3-src.tar.gz +httpcomponents-core-4.1.4-src.tar.gz +/httpcomponents-core-4.2.1-src.tar.gz +/httpcomponents-core-4.2.3-src.tar.gz +/httpcomponents-core-4.2.4-src.tar.gz +/httpcomponents-core-4.3-src.tar.gz +/httpcomponents-core-4.3.2-src.tar.gz +/httpcomponents-core-4.4-src.tar.gz +/httpcomponents-core-4.4.1-src.tar.gz +/httpcomponents-core-4.4.2-src.tar.gz +/httpcomponents-core-4.4.3-src.tar.gz +/httpcomponents-core-4.4.4-src.tar.gz +/httpcomponents-core-4.4.5-src.tar.gz +/httpcomponents-core-4.4.6-src.tar.gz +/httpcomponents-core-4.4.7-src.tar.gz +/httpcomponents-core-4.4.8-src.tar.gz +/httpcomponents-core-4.4.9-src.tar.gz +/httpcomponents-core-4.4.10-src.tar.gz +/httpcomponents-core-4.4.11-src.tar.gz +/httpcomponents-core-4.4.12-src.tar.gz +/httpcomponents-core-4.4.13-src.tar.gz +/httpcomponents-core-4.4.16-src.tar.gz +/httpcomponents-core-4.4.16-source-release.zip diff --git a/0001-Port-to-mockito-2.patch b/0001-Port-to-mockito-2.patch new file mode 100644 index 0000000..78aeb3d --- /dev/null +++ b/0001-Port-to-mockito-2.patch @@ -0,0 +1,341 @@ +From 85107ca9057cda2ed4d72ba1fd3c2c09be404af6 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Fri, 7 Dec 2018 19:50:08 +0000 +Subject: [PATCH] Port to mockito 2 + +For details, see: +https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2#incompatible +--- + .../impl/nio/pool/TestBasicNIOConnPool.java | 2 +- + .../apache/http/nio/pool/TestNIOConnPool.java | 68 +++++++++---------- + .../nio/protocol/TestHttpAsyncService.java | 8 +-- + 3 files changed, 39 insertions(+), 39 deletions(-) + +diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java +index 25e2781cf..ee277c69d 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java ++++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java +@@ -115,7 +115,7 @@ public void testTimeoutOnLeaseRelease() throws Exception { + Mockito.when(sessionRequest.getAttachment()).thenReturn(host); + Mockito.when(reactor.connect( + Matchers.any(SocketAddress.class), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.eq(host), + Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java b/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java +index 9672db6db..20f230acb 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java +@@ -176,7 +176,7 @@ public void testSuccessfulConnect() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.any(SocketAddress.class), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -209,7 +209,7 @@ public void testFailedConnect() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.any(SocketAddress.class), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -246,7 +246,7 @@ public void testCencelledConnect() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.any(SocketAddress.class), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + Mockito.when(ioReactor.getStatus()).thenReturn(IOReactorStatus.ACTIVE); +@@ -285,7 +285,7 @@ public void testTimeoutConnect() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.any(SocketAddress.class), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -350,12 +350,12 @@ public void testLeaseRelease() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest2); + +@@ -424,12 +424,12 @@ public void testMaxLimits() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest2); + +@@ -482,7 +482,7 @@ public void testMaxLimits() throws Exception { + Assert.assertFalse(future9.isDone()); + + Mockito.verify(ioReactor, Mockito.times(3)).connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.release(entry4, true); +@@ -494,7 +494,7 @@ public void testMaxLimits() throws Exception { + Assert.assertTrue(future9.isDone()); + + Mockito.verify(ioReactor, Mockito.times(4)).connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + } + +@@ -523,12 +523,12 @@ public void testConnectionRedistributionOnTotalMaxLimit() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2, sessionRequest1); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest3, sessionRequest4, sessionRequest3); + +@@ -544,12 +544,12 @@ public void testConnectionRedistributionOnTotalMaxLimit() throws Exception { + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.never()).connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); +@@ -575,12 +575,12 @@ public void testConnectionRedistributionOnTotalMaxLimit() throws Exception { + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest3); +@@ -603,12 +603,12 @@ public void testConnectionRedistributionOnTotalMaxLimit() throws Exception { + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.release(entry3, true); +@@ -616,12 +616,12 @@ public void testConnectionRedistributionOnTotalMaxLimit() throws Exception { + + Mockito.verify(ioReactor, Mockito.times(3)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); +@@ -643,12 +643,12 @@ public void testConnectionRedistributionOnTotalMaxLimit() throws Exception { + + Mockito.verify(ioReactor, Mockito.times(3)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + totals = pool.getTotalStats(); +@@ -677,7 +677,7 @@ public void testStatefulConnectionRedistributionOnPerRouteMaxLimit() throws Exce + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2, sessionRequest3); + +@@ -690,7 +690,7 @@ public void testStatefulConnectionRedistributionOnPerRouteMaxLimit() throws Exce + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); +@@ -725,7 +725,7 @@ public void testStatefulConnectionRedistributionOnPerRouteMaxLimit() throws Exce + + Mockito.verify(ioReactor, Mockito.times(2)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.release(entry3, true); +@@ -742,7 +742,7 @@ public void testStatefulConnectionRedistributionOnPerRouteMaxLimit() throws Exce + + Mockito.verify(ioReactor, Mockito.times(3)).connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioSession2).close(); +@@ -765,7 +765,7 @@ public void testCreateNewIfExpired() throws Exception { + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( + Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.any(SocketAddress.class), ++ Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + +@@ -774,7 +774,7 @@ public void testCreateNewIfExpired() throws Exception { + final Future future1 = pool.lease("somehost", null); + + Mockito.verify(ioReactor, Mockito.times(1)).connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); +@@ -794,7 +794,7 @@ public void testCreateNewIfExpired() throws Exception { + + Mockito.verify(ioSession1).close(); + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class)); + + final PoolStats totals = pool.getTotalStats(); +@@ -823,7 +823,7 @@ public void testCloseExpired() throws Exception { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2); + +@@ -879,7 +879,7 @@ public void testCloseIdle() throws Exception { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2); + +@@ -944,7 +944,7 @@ public void testLeaseRequestTimeout() throws Exception { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + +@@ -1048,7 +1048,7 @@ public void testLeaseRequestCanceled() throws Exception { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.getStatus()).thenReturn(IOReactorStatus.ACTIVE); +@@ -1082,7 +1082,7 @@ public void testLeaseRequestCanceledWhileConnecting() throws Exception { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.any(SocketAddress.class), ++ Matchers.any(SocketAddress.class), Matchers.isNull(), + Matchers.any(), Matchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.getStatus()).thenReturn(IOReactorStatus.ACTIVE); +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java +index dcb92a629..947b05fa9 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java +@@ -502,8 +502,8 @@ public void testEntityEnclosingRequestContinueWithoutVerification() throws Excep + Mockito.verify(this.conn).submitResponse(Matchers.argThat(new ArgumentMatcher() { + + @Override +- public boolean matches(final Object argument) { +- final int status = ((HttpResponse) argument).getStatusLine().getStatusCode(); ++ public boolean matches(final HttpResponse argument) { ++ final int status = argument.getStatusLine().getStatusCode(); + return status == 100; + } + +@@ -1019,8 +1019,8 @@ public void testResponseContinue() throws Exception { + Mockito.verify(this.conn).submitResponse(Matchers.argThat(new ArgumentMatcher() { + + @Override +- public boolean matches(final Object argument) { +- final int status = ((HttpResponse) argument).getStatusLine().getStatusCode(); ++ public boolean matches(final HttpResponse argument) { ++ final int status = argument.getStatusLine().getStatusCode(); + return status == 100; + } + +-- +2.21.0 + diff --git a/0002-Port-to-Mockito-5.patch b/0002-Port-to-Mockito-5.patch new file mode 100644 index 0000000..9ee9438 --- /dev/null +++ b/0002-Port-to-Mockito-5.patch @@ -0,0 +1,2384 @@ +From d813592b77c355396b4114bd1a4ddbb77cbede9c Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Tue, 12 Dec 2023 12:22:49 +0100 +Subject: [PATCH] Port to Mockito 5 + +Generated by running: +find -name '*.java' -exec sed -i \ + -e 's/org\.mockito\.Matchers/org.mockito.ArgumentMatchers/g' \ + -e 's/\([^[:alnum:]]\)Matchers\([^[:alnum:]]\)/\1ArgumentMatchers\2/g' \ + -e 's/Mockito\.anyObject()/Mockito\.any()/g' \ +{} + +--- + .../nio/TestDefaultNHttpClientConnection.java | 124 ++++++------ + .../nio/TestDefaultNHttpServerConnection.java | 124 ++++++------ + .../impl/nio/codecs/TestChunkEncoder.java | 4 +- + .../impl/nio/codecs/TestIdentityEncoder.java | 46 ++--- + .../codecs/TestLengthDelimitedEncoder.java | 50 ++--- + .../impl/nio/pool/TestBasicNIOConnPool.java | 10 +- + .../apache/http/nio/pool/TestNIOConnPool.java | 188 +++++++++--------- + .../TestBasicAsyncClientExchangeHandler.java | 4 +- + .../TestBasicAsyncRequestHandler.java | 4 +- + .../TestHttpAsyncRequestExecutor.java | 16 +- + .../nio/protocol/TestHttpAsyncRequester.java | 18 +- + .../nio/protocol/TestHttpAsyncService.java | 70 +++---- + .../http/impl/TestBHttpConnectionBase.java | 24 +-- + .../http/impl/io/TestSessionInOutBuffers.java | 10 +- + .../org/apache/http/pool/TestConnPool.java | 58 +++--- + .../protocol/TestHttpRequestExecutor.java | 10 +- + .../apache/http/protocol/TestHttpService.java | 6 +- + 17 files changed, 383 insertions(+), 383 deletions(-) + +diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java +index f404bfb..775878e 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java ++++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpClientConnection.java +@@ -57,7 +57,7 @@ import org.apache.http.protocol.HTTP; + import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mock; + import org.mockito.Mockito; + import org.mockito.MockitoAnnotations; +@@ -180,7 +180,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(19, conn.outbuf.length()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -188,7 +188,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("POST / HTTP/1.1\r\n\r\nstuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(1)).write(ArgumentMatchers.any()); + } + + @Test +@@ -205,7 +205,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(19, conn.outbuf.length()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -213,7 +213,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("POST / HTTP/1.1\r\n\r\na lot of various stuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -227,10 +227,10 @@ public class TestDefaultNHttpClientConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new RequestReadyAnswer(request)).when( +- handler).requestReady(Matchers.any()); ++ handler).requestReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -238,7 +238,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("POST / HTTP/1.1\r\n\r\nstuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(1)).write(ArgumentMatchers.any()); + } + + @Test +@@ -252,10 +252,10 @@ public class TestDefaultNHttpClientConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new RequestReadyAnswer(request)).when( +- handler).requestReady(Matchers.any()); ++ handler).requestReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -263,7 +263,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("POST / HTTP/1.1\r\n\r\na lot of various stuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -277,10 +277,10 @@ public class TestDefaultNHttpClientConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new RequestReadyAnswer(request)).when( +- handler).requestReady(Matchers.any()); ++ handler).requestReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -290,7 +290,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(17, conn.outbuf.length()); + + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -305,10 +305,10 @@ public class TestDefaultNHttpClientConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new RequestReadyAnswer(request)).when( +- handler).requestReady(Matchers.any()); ++ handler).requestReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -317,7 +317,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals("POST / HTTP/1.1\r\n\r\na loo", wchannel.dump(Consts.ASCII)); + + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); +- Mockito.verify(wchannel, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(3)).write(ArgumentMatchers.any()); + } + + @Test +@@ -335,10 +335,10 @@ public class TestDefaultNHttpClientConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new RequestReadyAnswer(request)).when( +- handler).requestReady(Matchers.any()); ++ handler).requestReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -347,7 +347,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals("POST / HTTP/1.1\r\nTransfer-Encoding: chunked\r\n\r\n" + + "5\r\na lot\r\n11\r\n of various stuff\r\n0\r\n\r\n", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -365,10 +365,10 @@ public class TestDefaultNHttpClientConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new RequestReadyAnswer(request)).when( +- handler).requestReady(Matchers.any()); ++ handler).requestReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -379,7 +379,7 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(21, conn.outbuf.length()); + + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -399,13 +399,13 @@ public class TestDefaultNHttpClientConnection { + + Assert.assertEquals(NHttpConnection.CLOSED, conn.getStatus()); + +- Mockito.verify(wchannel, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(1)).write(ArgumentMatchers.any()); + Mockito.verify(session, Mockito.times(1)).close(); + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); + Mockito.verify(handler, Mockito.never()).requestReady( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).outputReady( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + } + + static class ResponseCapturingAnswer implements Answer { +@@ -462,9 +462,9 @@ public class TestDefaultNHttpClientConnection { + final LinkedList responses = new LinkedList(); + + Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when( +- handler).responseReceived(Matchers.any()); ++ handler).responseReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertEquals(0, conn.getMetrics().getResponseCount()); + +@@ -476,12 +476,12 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(43, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.times(1)).responseReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.times(1)).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(2)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(2)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertFalse(responses.isEmpty()); + final HttpResponse response = responses.getFirst(); +@@ -507,9 +507,9 @@ public class TestDefaultNHttpClientConnection { + final LinkedList responses = new LinkedList(); + + Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when( +- handler).responseReceived(Matchers.any()); ++ handler).responseReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertEquals(0, conn.getMetrics().getResponseCount()); + +@@ -521,12 +521,12 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(54, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.times(1)).responseReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.times(1)).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(2)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(2)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertFalse(responses.isEmpty()); + final HttpResponse response = responses.getFirst(); +@@ -543,9 +543,9 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(1, conn.getMetrics().getResponseCount()); + Assert.assertEquals(54, conn.getMetrics().getReceivedBytesCount()); + +- Mockito.verify(rchannel, Mockito.times(3)).read(Matchers.any()); ++ Mockito.verify(rchannel, Mockito.times(3)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + } + + @Test +@@ -559,9 +559,9 @@ public class TestDefaultNHttpClientConnection { + final LinkedList responses = new LinkedList(); + + Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when( +- handler).responseReceived(Matchers.any()); ++ handler).responseReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.consumeInput(handler); + +@@ -569,12 +569,12 @@ public class TestDefaultNHttpClientConnection { + Assert.assertNull(conn.contentDecoder); + + Mockito.verify(handler, Mockito.times(1)).responseReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(1)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(1)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertFalse(responses.isEmpty()); + final HttpResponse response = responses.getFirst(); +@@ -597,9 +597,9 @@ public class TestDefaultNHttpClientConnection { + final LinkedList responses = new LinkedList(); + + Mockito.doAnswer(new ResponseCapturingAnswer(responses)).when( +- handler).responseReceived(Matchers.any()); ++ handler).responseReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertEquals(0, conn.getMetrics().getResponseCount()); + +@@ -611,12 +611,12 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(0, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.never()).responseReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(1)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(1)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.consumeInput(handler); + +@@ -626,12 +626,12 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(0, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.never()).responseReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(2)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(2)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.consumeInput(handler); + Assert.assertNull(conn.getHttpResponse()); +@@ -640,14 +640,14 @@ public class TestDefaultNHttpClientConnection { + Assert.assertEquals(0, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.never()).responseReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(3)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(3)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.times(1)).endOfInput( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + } + +@@ -662,7 +662,7 @@ public class TestDefaultNHttpClientConnection { + + conn.close(); + conn.consumeInput(handler); +- Mockito.verify(rchannel, Mockito.never()).read(Matchers.any()); ++ Mockito.verify(rchannel, Mockito.never()).read(ArgumentMatchers.any()); + Mockito.verify(session, Mockito.times(1)).clearEvent(SelectionKey.OP_READ); + } + +diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java +index 334c941..3004f51 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java ++++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/TestDefaultNHttpServerConnection.java +@@ -57,7 +57,7 @@ import org.apache.http.protocol.HTTP; + import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mock; + import org.mockito.Mockito; + import org.mockito.MockitoAnnotations; +@@ -180,7 +180,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(19, conn.outbuf.length()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -188,7 +188,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("HTTP/1.1 200 OK\r\n\r\nstuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(1)).write(ArgumentMatchers.any()); + } + + @Test +@@ -205,7 +205,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(19, conn.outbuf.length()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -213,7 +213,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("HTTP/1.1 200 OK\r\n\r\na lot of various stuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -227,10 +227,10 @@ public class TestDefaultNHttpServerConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new ResponseReadyAnswer(response)).when( +- handler).responseReady(Matchers.any()); ++ handler).responseReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -238,7 +238,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("HTTP/1.1 200 OK\r\n\r\nstuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(1)).write(ArgumentMatchers.any()); + } + + @Test +@@ -252,10 +252,10 @@ public class TestDefaultNHttpServerConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new ResponseReadyAnswer(response)).when( +- handler).responseReady(Matchers.any()); ++ handler).responseReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -263,7 +263,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertNull(conn.contentEncoder); + Assert.assertEquals("HTTP/1.1 200 OK\r\n\r\na lot of various stuff", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -277,10 +277,10 @@ public class TestDefaultNHttpServerConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new ResponseReadyAnswer(response)).when( +- handler).responseReady(Matchers.any()); ++ handler).responseReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -290,7 +290,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(17, conn.outbuf.length()); + + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -305,10 +305,10 @@ public class TestDefaultNHttpServerConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new ResponseReadyAnswer(response)).when( +- handler).responseReady(Matchers.any()); ++ handler).responseReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -317,7 +317,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals("HTTP/1.1 200 OK\r\n\r\na loo", wchannel.dump(Consts.ASCII)); + + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); +- Mockito.verify(wchannel, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(3)).write(ArgumentMatchers.any()); + } + + @Test +@@ -335,10 +335,10 @@ public class TestDefaultNHttpServerConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new ResponseReadyAnswer(response)).when( +- handler).responseReady(Matchers.any()); ++ handler).responseReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -347,7 +347,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals("HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n" + + "5\r\na lot\r\n11\r\n of various stuff\r\n0\r\n\r\n", wchannel.dump(Consts.ASCII)); + +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -365,10 +365,10 @@ public class TestDefaultNHttpServerConnection { + Mockito.when(session.channel()).thenReturn(channel); + + Mockito.doAnswer(new ResponseReadyAnswer(response)).when( +- handler).responseReady(Matchers.any()); ++ handler).responseReady(ArgumentMatchers.any()); + + Mockito.doAnswer(new ProduceContentAnswer(entity)).when( +- handler).outputReady(Matchers.any(), Matchers.any()); ++ handler).outputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.produceOutput(handler); + +@@ -379,7 +379,7 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(21, conn.outbuf.length()); + + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); +- Mockito.verify(wchannel, Mockito.times(2)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(2)).write(ArgumentMatchers.any()); + } + + @Test +@@ -399,13 +399,13 @@ public class TestDefaultNHttpServerConnection { + + Assert.assertEquals(NHttpConnection.CLOSED, conn.getStatus()); + +- Mockito.verify(wchannel, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(wchannel, Mockito.times(1)).write(ArgumentMatchers.any()); + Mockito.verify(session, Mockito.times(1)).close(); + Mockito.verify(session, Mockito.never()).clearEvent(SelectionKey.OP_WRITE); + Mockito.verify(handler, Mockito.never()).responseReady( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).outputReady( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + } + + static class RequestCapturingAnswer implements Answer { +@@ -462,9 +462,9 @@ public class TestDefaultNHttpServerConnection { + final LinkedList requests = new LinkedList(); + + Mockito.doAnswer(new RequestCapturingAnswer(requests)).when( +- handler).requestReceived(Matchers.any()); ++ handler).requestReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertEquals(0, conn.getMetrics().getRequestCount()); + +@@ -476,12 +476,12 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(43, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.times(1)).requestReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.times(1)).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(2)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(2)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertFalse(requests.isEmpty()); + final HttpRequest request = requests.getFirst(); +@@ -508,9 +508,9 @@ public class TestDefaultNHttpServerConnection { + final LinkedList requests = new LinkedList(); + + Mockito.doAnswer(new RequestCapturingAnswer(requests)).when( +- handler).requestReceived(Matchers.any()); ++ handler).requestReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertEquals(0, conn.getMetrics().getResponseCount()); + +@@ -522,12 +522,12 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(54, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.times(1)).requestReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.times(1)).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(2)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(2)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertFalse(requests.isEmpty()); + final HttpRequest request = requests.getFirst(); +@@ -545,9 +545,9 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(1, conn.getMetrics().getRequestCount()); + Assert.assertEquals(54, conn.getMetrics().getReceivedBytesCount()); + +- Mockito.verify(rchannel, Mockito.times(3)).read(Matchers.any()); ++ Mockito.verify(rchannel, Mockito.times(3)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + } + + @Test +@@ -561,9 +561,9 @@ public class TestDefaultNHttpServerConnection { + final LinkedList requests = new LinkedList(); + + Mockito.doAnswer(new RequestCapturingAnswer(requests)).when( +- handler).requestReceived(Matchers.any()); ++ handler).requestReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.consumeInput(handler); + +@@ -571,12 +571,12 @@ public class TestDefaultNHttpServerConnection { + Assert.assertNull(conn.contentDecoder); + + Mockito.verify(handler, Mockito.times(1)).requestReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(1)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(1)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertFalse(requests.isEmpty()); + final HttpRequest request = requests.getFirst(); +@@ -599,9 +599,9 @@ public class TestDefaultNHttpServerConnection { + final LinkedList requests = new LinkedList(); + + Mockito.doAnswer(new RequestCapturingAnswer(requests)).when( +- handler).requestReceived(Matchers.any()); ++ handler).requestReceived(ArgumentMatchers.any()); + Mockito.doAnswer(new ConsumeContentAnswer(new SimpleInputBuffer(64))).when( +- handler).inputReady(Matchers.any(), Matchers.any()); ++ handler).inputReady(ArgumentMatchers.any(), ArgumentMatchers.any()); + + Assert.assertEquals(0, conn.getMetrics().getResponseCount()); + +@@ -613,12 +613,12 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(0, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.never()).requestReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(1)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(1)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.consumeInput(handler); + +@@ -628,12 +628,12 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(0, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.never()).requestReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(2)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(2)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + conn.consumeInput(handler); + Assert.assertNull(conn.getHttpResponse()); +@@ -642,14 +642,14 @@ public class TestDefaultNHttpServerConnection { + Assert.assertEquals(0, conn.getMetrics().getReceivedBytesCount()); + + Mockito.verify(handler, Mockito.never()).requestReceived( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).inputReady( +- Matchers.any(), Matchers.any()); +- Mockito.verify(rchannel, Mockito.times(3)).read(Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(rchannel, Mockito.times(3)).read(ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.times(1)).endOfInput( +- Matchers.any()); ++ ArgumentMatchers.any()); + Mockito.verify(handler, Mockito.never()).exception( +- Matchers.any(), Matchers.any()); ++ ArgumentMatchers.any(), ArgumentMatchers.any()); + + } + +@@ -664,7 +664,7 @@ public class TestDefaultNHttpServerConnection { + + conn.close(); + conn.consumeInput(handler); +- Mockito.verify(rchannel, Mockito.never()).read(Matchers.any()); ++ Mockito.verify(rchannel, Mockito.never()).read(ArgumentMatchers.any()); + Mockito.verify(session, Mockito.times(1)).clearEvent(SelectionKey.OP_READ); + } + +diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java +index d63f2d6..0d79ec6 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java ++++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkEncoder.java +@@ -36,7 +36,7 @@ import org.apache.http.impl.nio.reactor.SessionOutputBufferImpl; + import org.apache.http.nio.reactor.SessionOutputBuffer; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + /** +@@ -126,7 +126,7 @@ public class TestChunkEncoder { + Assert.assertEquals(16, encoder.write(CodecTestUtils.wrap("0123456789ABCDEF"))); + Assert.assertEquals(16, encoder.write(CodecTestUtils.wrap("0123456789ABCDEF"))); + +- Mockito.verify(channel, Mockito.never()).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.never()).write(ArgumentMatchers.any()); + + outbuf.flush(channel); + final String s = channel.dump(Consts.ASCII); +diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java +index ccdcb5e..1eb721c 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java ++++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityEncoder.java +@@ -41,7 +41,7 @@ import org.apache.http.nio.reactor.SessionOutputBuffer; + import org.junit.After; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + /** +@@ -312,8 +312,8 @@ public class TestIdentityEncoder { + final IdentityEncoder encoder = new IdentityEncoder(channel, outbuf, metrics, 0); + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + +- Mockito.verify(channel, Mockito.times(2)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.never()).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(2)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.never()).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(13, metrics.getBytesTransferred()); +@@ -334,8 +334,8 @@ public class TestIdentityEncoder { + final IdentityEncoder encoder = new IdentityEncoder(channel, outbuf, metrics, 32); + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + +- Mockito.verify(channel, Mockito.never()).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.never()).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(1)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.never()).flush(channel); + + Assert.assertEquals(0, metrics.getBytesTransferred()); +@@ -357,8 +357,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.never()).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.never()).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.never()).flush(channel); + + Assert.assertEquals(0, metrics.getBytesTransferred()); +@@ -379,8 +379,8 @@ public class TestIdentityEncoder { + final IdentityEncoder encoder = new IdentityEncoder(channel, outbuf, metrics, 2); + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + +- Mockito.verify(channel, Mockito.times(2)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.never()).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(2)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.never()).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(13, metrics.getBytesTransferred()); +@@ -403,8 +403,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(5)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(5)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(3)).flush(channel); + + Assert.assertEquals(18, metrics.getBytesTransferred()); +@@ -428,8 +428,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(4)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(4)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(2)).flush(channel); + + Assert.assertEquals(18, metrics.getBytesTransferred()); +@@ -455,8 +455,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(2, encoder.write(CodecTestUtils.wrap("--"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(4)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(5)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(4)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(5)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(2)).flush(channel); + + Assert.assertEquals(21, metrics.getBytesTransferred()); +@@ -477,8 +477,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + Assert.assertEquals(6, encoder.write(CodecTestUtils.wrap("-stuff"))); + +- Mockito.verify(channel, Mockito.times(1)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(1)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(8, metrics.getBytesTransferred()); +@@ -500,8 +500,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + Assert.assertEquals(16, encoder.write(CodecTestUtils.wrap("-much more stuff"))); + +- Mockito.verify(channel, Mockito.times(2)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(2)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(1)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(21, metrics.getBytesTransferred()); +@@ -530,8 +530,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(0, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(0, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(5)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(6)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(5)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(6)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(4)).flush(channel); + + Assert.assertEquals(8, metrics.getBytesTransferred()); +@@ -555,8 +555,8 @@ public class TestIdentityEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("much more stuff"))); + +- Mockito.verify(channel, Mockito.times(3)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(3)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(8, metrics.getBytesTransferred()); +diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java +index 71e0515..129cd37 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java ++++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java +@@ -41,7 +41,7 @@ import org.apache.http.nio.reactor.SessionOutputBuffer; + import org.junit.After; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + /** +@@ -371,8 +371,8 @@ public class TestLengthDelimitedEncoder { + 100, 0); + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + +- Mockito.verify(channel, Mockito.times(2)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.never()).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(2)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.never()).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(13, metrics.getBytesTransferred()); +@@ -394,8 +394,8 @@ public class TestLengthDelimitedEncoder { + 100, 32); + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + +- Mockito.verify(channel, Mockito.never()).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.never()).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(1)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.never()).flush(channel); + + Assert.assertEquals(0, metrics.getBytesTransferred()); +@@ -418,8 +418,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.never()).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.never()).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.never()).flush(channel); + + Assert.assertEquals(0, metrics.getBytesTransferred()); +@@ -442,8 +442,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff; and a lot more stuff"))); + +- Mockito.verify(channel, Mockito.never()).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.never()).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.never()).flush(channel); + + Assert.assertEquals(0, metrics.getBytesTransferred()); +@@ -465,8 +465,8 @@ public class TestLengthDelimitedEncoder { + 100, 2); + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + +- Mockito.verify(channel, Mockito.times(2)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.never()).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(2)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.never()).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(13, metrics.getBytesTransferred()); +@@ -490,8 +490,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(5)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(5)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(3)).flush(channel); + + Assert.assertEquals(18, metrics.getBytesTransferred()); +@@ -516,8 +516,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(4)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(4)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(2)).flush(channel); + + Assert.assertEquals(18, metrics.getBytesTransferred()); +@@ -544,8 +544,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(2, encoder.write(CodecTestUtils.wrap("--"))); + Assert.assertEquals(10, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(4)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(5)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(4)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(5)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(2)).flush(channel); + + Assert.assertEquals(21, metrics.getBytesTransferred()); +@@ -567,8 +567,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + Assert.assertEquals(6, encoder.write(CodecTestUtils.wrap("-stuff"))); + +- Mockito.verify(channel, Mockito.times(1)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(1)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(8, metrics.getBytesTransferred()); +@@ -591,8 +591,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(5, encoder.write(CodecTestUtils.wrap("stuff"))); + Assert.assertEquals(16, encoder.write(CodecTestUtils.wrap("-much more stuff"))); + +- Mockito.verify(channel, Mockito.times(2)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(1)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(2)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(1)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(21, metrics.getBytesTransferred()); +@@ -622,8 +622,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(0, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(0, encoder.write(CodecTestUtils.wrap("more stuff"))); + +- Mockito.verify(channel, Mockito.times(5)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(6)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(5)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(6)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(4)).flush(channel); + + Assert.assertEquals(8, metrics.getBytesTransferred()); +@@ -648,8 +648,8 @@ public class TestLengthDelimitedEncoder { + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("-"))); + Assert.assertEquals(1, encoder.write(CodecTestUtils.wrap("much more stuff"))); + +- Mockito.verify(channel, Mockito.times(3)).write(Matchers.any()); +- Mockito.verify(outbuf, Mockito.times(3)).write(Matchers.any()); ++ Mockito.verify(channel, Mockito.times(3)).write(ArgumentMatchers.any()); ++ Mockito.verify(outbuf, Mockito.times(3)).write(ArgumentMatchers.any()); + Mockito.verify(outbuf, Mockito.times(1)).flush(channel); + + Assert.assertEquals(8, metrics.getBytesTransferred()); +diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java +index ee277c6..72e0193 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java ++++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/pool/TestBasicNIOConnPool.java +@@ -38,7 +38,7 @@ import org.junit.After; + import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mock; + import org.mockito.Mockito; + import org.mockito.MockitoAnnotations; +@@ -114,10 +114,10 @@ public class TestBasicNIOConnPool { + Mockito.when(sessionRequest.getSession()).thenReturn(session); + Mockito.when(sessionRequest.getAttachment()).thenReturn(host); + Mockito.when(reactor.connect( +- Matchers.any(SocketAddress.class), +- Matchers.isNull(), +- Matchers.eq(host), +- Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.eq(host), ++ ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + + Mockito.when(session.getSocketTimeout()).thenReturn(999); +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java b/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java +index 20f230a..9322b6e 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/pool/TestNIOConnPool.java +@@ -48,7 +48,7 @@ import org.apache.http.pool.PoolEntry; + import org.apache.http.pool.PoolStats; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestNIOConnPool { +@@ -175,9 +175,9 @@ public class TestNIOConnPool { + Mockito.when(sessionRequest.getSession()).thenReturn(ioSession); + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); + final Future future = pool.lease("somehost", null, 100, TimeUnit.MILLISECONDS, null); +@@ -208,9 +208,9 @@ public class TestNIOConnPool { + Mockito.when(sessionRequest.getException()).thenReturn(new IOException()); + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); + final Future future = pool.lease("somehost", null); +@@ -245,9 +245,9 @@ public class TestNIOConnPool { + Mockito.when(sessionRequest.getSession()).thenReturn(ioSession); + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + Mockito.when(ioReactor.getStatus()).thenReturn(IOReactorStatus.ACTIVE); + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -284,9 +284,9 @@ public class TestNIOConnPool { + Mockito.when(sessionRequest.getSession()).thenReturn(ioSession); + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest); + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); + final Future future = pool.lease("somehost", null); +@@ -349,14 +349,14 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest2); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -423,14 +423,14 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest2); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -482,8 +482,8 @@ public class TestNIOConnPool { + Assert.assertFalse(future9.isDone()); + + Mockito.verify(ioReactor, Mockito.times(3)).connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.release(entry4, true); + pool.release(entry5, false); +@@ -494,8 +494,8 @@ public class TestNIOConnPool { + Assert.assertTrue(future9.isDone()); + + Mockito.verify(ioReactor, Mockito.times(4)).connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + } + + @Test +@@ -522,14 +522,14 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2, sessionRequest1); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest3, sessionRequest4, sessionRequest3); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -543,14 +543,14 @@ public class TestNIOConnPool { + final Future future4 = pool.lease("otherhost", null); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.never()).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); + pool.requestCompleted(sessionRequest2); +@@ -574,14 +574,14 @@ public class TestNIOConnPool { + pool.release(entry2, true); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest3); + pool.requestCompleted(sessionRequest4); +@@ -602,27 +602,27 @@ public class TestNIOConnPool { + final Future future6 = pool.lease("otherhost", null); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.release(entry3, true); + pool.release(entry4, true); + + Mockito.verify(ioReactor, Mockito.times(3)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); + +@@ -642,14 +642,14 @@ public class TestNIOConnPool { + pool.release(entry6, true); + + Mockito.verify(ioReactor, Mockito.times(3)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("otherhost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + totals = pool.getTotalStats(); + Assert.assertEquals(2, totals.getAvailable()); +@@ -676,9 +676,9 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2, sessionRequest3); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 10); +@@ -689,9 +689,9 @@ public class TestNIOConnPool { + final Future future2 = pool.lease("somehost", null); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); + pool.requestCompleted(sessionRequest2); +@@ -724,9 +724,9 @@ public class TestNIOConnPool { + Assert.assertNotNull(entry4); + + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.release(entry3, true); + pool.release(entry4, true); +@@ -741,9 +741,9 @@ public class TestNIOConnPool { + Assert.assertFalse(future5.isDone()); + + Mockito.verify(ioReactor, Mockito.times(3)).connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + Mockito.verify(ioSession2).close(); + Mockito.verify(ioSession1, Mockito.never()).close(); +@@ -764,9 +764,9 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), +- Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.eq(InetSocketAddress.createUnresolved("somehost", 80)), ++ ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 2); +@@ -774,8 +774,8 @@ public class TestNIOConnPool { + final Future future1 = pool.lease("somehost", null); + + Mockito.verify(ioReactor, Mockito.times(1)).connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + pool.requestCompleted(sessionRequest1); + +@@ -794,8 +794,8 @@ public class TestNIOConnPool { + + Mockito.verify(ioSession1).close(); + Mockito.verify(ioReactor, Mockito.times(2)).connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class)); ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class)); + + final PoolStats totals = pool.getTotalStats(); + Assert.assertEquals(0, totals.getAvailable()); +@@ -823,8 +823,8 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 2); +@@ -879,8 +879,8 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1, sessionRequest2); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 2, 2); +@@ -944,8 +944,8 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + + final LocalSessionPool pool = new LocalSessionPool(ioReactor, 1, 1); +@@ -1048,8 +1048,8 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.getStatus()).thenReturn(IOReactorStatus.ACTIVE); + +@@ -1082,8 +1082,8 @@ public class TestNIOConnPool { + + final ConnectingIOReactor ioReactor = Mockito.mock(ConnectingIOReactor.class); + Mockito.when(ioReactor.connect( +- Matchers.any(SocketAddress.class), Matchers.isNull(), +- Matchers.any(), Matchers.any(SessionRequestCallback.class))). ++ ArgumentMatchers.any(SocketAddress.class), ArgumentMatchers.isNull(), ++ ArgumentMatchers.any(), ArgumentMatchers.any(SessionRequestCallback.class))). + thenReturn(sessionRequest1); + Mockito.when(ioReactor.getStatus()).thenReturn(IOReactorStatus.ACTIVE); + +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java +index f5e895e..6f2f25d 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncClientExchangeHandler.java +@@ -46,7 +46,7 @@ import org.junit.After; + import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestBasicAsyncClientExchangeHandler { +@@ -343,7 +343,7 @@ public class TestBasicAsyncClientExchangeHandler { + @Test + public void testInputTerminated() throws Exception { + this.exchangeHandler.inputTerminated(); +- Mockito.verify(this.responseConsumer).failed(Matchers.any()); ++ Mockito.verify(this.responseConsumer).failed(ArgumentMatchers.any()); + try { + this.exchangeHandler.getFuture().get(); + Assert.fail("ExecutionException expected"); +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncRequestHandler.java b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncRequestHandler.java +index 3b44478..8596292 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncRequestHandler.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncRequestHandler.java +@@ -38,7 +38,7 @@ import org.junit.After; + import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestBasicAsyncRequestHandler { +@@ -90,7 +90,7 @@ public class TestBasicAsyncRequestHandler { + this.asyncRequestHandler.handle(this.request, this.httpexchange, this.context); + + Mockito.verify(this.requestHandler).handle( +- Matchers.eq(this.request), Matchers.eq(this.response), Matchers.eq(this.context)); ++ ArgumentMatchers.eq(this.request), ArgumentMatchers.eq(this.response), ArgumentMatchers.eq(this.context)); + Mockito.verify(this.httpexchange).submitResponse(); + } + +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java +index 3568fd0..fffac8a 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java +@@ -52,7 +52,7 @@ import org.junit.After; + import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestHttpAsyncRequestExecutor { +@@ -131,7 +131,7 @@ public class TestHttpAsyncRequestExecutor { + + this.protocolHandler.closed(this.conn); + +- Mockito.verify(this.exchangeHandler).failed(Matchers.any(ConnectionClosedException.class)); ++ Mockito.verify(this.exchangeHandler).failed(ArgumentMatchers.any(ConnectionClosedException.class)); + } + + @Test +@@ -195,7 +195,7 @@ public class TestHttpAsyncRequestExecutor { + Assert.assertNull(state.getRequest()); + + Mockito.verify(this.conn, Mockito.times(1)).suspendOutput(); +- Mockito.verify(this.conn, Mockito.never()).submitRequest(Matchers.any()); ++ Mockito.verify(this.conn, Mockito.never()).submitRequest(ArgumentMatchers.any()); + } + + @Test +@@ -612,7 +612,7 @@ public class TestHttpAsyncRequestExecutor { + Assert.assertFalse(state.isValid()); + + Mockito.verify(this.conn).close(); +- Mockito.verify(this.exchangeHandler).failed(Matchers.any(ConnectionClosedException.class)); ++ Mockito.verify(this.exchangeHandler).failed(ArgumentMatchers.any(ConnectionClosedException.class)); + } + + @Test +@@ -671,10 +671,10 @@ public class TestHttpAsyncRequestExecutor { + + Assert.assertEquals(MessageState.BODY_STREAM, state.getRequestState()); + Assert.assertFalse(state.isValid()); +- Mockito.verify(this.exchangeHandler).failed(Matchers.any(SocketTimeoutException.class)); ++ Mockito.verify(this.exchangeHandler).failed(ArgumentMatchers.any(SocketTimeoutException.class)); + Mockito.verify(this.exchangeHandler).close(); + Mockito.verify(this.conn).close(); +- Mockito.verify(this.conn, Mockito.never()).setSocketTimeout(Matchers.anyInt()); ++ Mockito.verify(this.conn, Mockito.never()).setSocketTimeout(ArgumentMatchers.anyInt()); + } + + @Test +@@ -689,7 +689,7 @@ public class TestHttpAsyncRequestExecutor { + + Assert.assertEquals(MessageState.BODY_STREAM, state.getRequestState()); + Assert.assertFalse(state.isValid()); +- Mockito.verify(this.exchangeHandler).failed(Matchers.any(SocketTimeoutException.class)); ++ Mockito.verify(this.exchangeHandler).failed(ArgumentMatchers.any(SocketTimeoutException.class)); + Mockito.verify(this.exchangeHandler).close(); + Mockito.verify(this.conn).close(); + Mockito.verify(this.conn).setSocketTimeout(250); +@@ -707,7 +707,7 @@ public class TestHttpAsyncRequestExecutor { + + Assert.assertEquals(MessageState.BODY_STREAM, state.getRequestState()); + Assert.assertFalse(state.isValid()); +- Mockito.verify(this.exchangeHandler).failed(Matchers.any(SocketTimeoutException.class)); ++ Mockito.verify(this.exchangeHandler).failed(ArgumentMatchers.any(SocketTimeoutException.class)); + Mockito.verify(this.exchangeHandler).close(); + Mockito.verify(this.conn).shutdown(); + } +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequester.java b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequester.java +index ff9f753..6b203b1 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequester.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequester.java +@@ -47,7 +47,7 @@ import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; + import org.mockito.ArgumentCaptor; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestHttpAsyncRequester { +@@ -174,8 +174,8 @@ public class TestHttpAsyncRequester { + this.responseConsumer, + this.conn, this.exchangeContext, null); + Assert.assertNotNull(future); +- Mockito.verify(this.requestProducer).failed(Matchers.any(ConnectionClosedException.class)); +- Mockito.verify(this.responseConsumer).failed(Matchers.any(ConnectionClosedException.class)); ++ Mockito.verify(this.requestProducer).failed(ArgumentMatchers.any(ConnectionClosedException.class)); ++ Mockito.verify(this.responseConsumer).failed(ArgumentMatchers.any(ConnectionClosedException.class)); + Mockito.verify(this.requestProducer, Mockito.atLeastOnce()).close(); + Mockito.verify(this.responseConsumer, Mockito.atLeastOnce()).close(); + Assert.assertTrue(future.isDone()); +@@ -203,7 +203,7 @@ public class TestHttpAsyncRequester { + Assert.assertNotNull(future); + final ArgumentCaptor argCaptor = ArgumentCaptor.forClass(FutureCallback.class); + Mockito.verify(this.connPool).lease( +- Matchers.eq(host), Matchers.isNull(), argCaptor.capture()); ++ ArgumentMatchers.eq(host), ArgumentMatchers.isNull(), argCaptor.capture()); + final ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue(); + + final Exception oppsie = new Exception(); +@@ -227,7 +227,7 @@ public class TestHttpAsyncRequester { + Assert.assertNotNull(future); + final ArgumentCaptor argCaptor = ArgumentCaptor.forClass(FutureCallback.class); + Mockito.verify(this.connPool).lease( +- Matchers.eq(host), Matchers.isNull(), argCaptor.capture()); ++ ArgumentMatchers.eq(host), ArgumentMatchers.isNull(), argCaptor.capture()); + final ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue(); + + connRequestCallback.cancelled(); +@@ -250,7 +250,7 @@ public class TestHttpAsyncRequester { + Assert.assertNotNull(future); + final ArgumentCaptor argCaptor = ArgumentCaptor.forClass(FutureCallback.class); + Mockito.verify(this.connPool).lease( +- Matchers.eq(host), Matchers.isNull(), argCaptor.capture()); ++ ArgumentMatchers.eq(host), ArgumentMatchers.isNull(), argCaptor.capture()); + final ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue(); + + future.cancel(true); +@@ -275,7 +275,7 @@ public class TestHttpAsyncRequester { + Assert.assertNotNull(future); + final ArgumentCaptor argCaptor = ArgumentCaptor.forClass(FutureCallback.class); + Mockito.verify(this.connPool).lease( +- Matchers.eq(host), Matchers.isNull(), argCaptor.capture()); ++ ArgumentMatchers.eq(host), ArgumentMatchers.isNull(), argCaptor.capture()); + final ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue(); + + final BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn); +@@ -308,7 +308,7 @@ public class TestHttpAsyncRequester { + Assert.assertNotNull(future); + final ArgumentCaptor argCaptor = ArgumentCaptor.forClass(FutureCallback.class); + Mockito.verify(this.connPool).lease( +- Matchers.eq(host), Matchers.isNull(), argCaptor.capture()); ++ ArgumentMatchers.eq(host), ArgumentMatchers.isNull(), argCaptor.capture()); + final ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue(); + + final BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn); +@@ -341,7 +341,7 @@ public class TestHttpAsyncRequester { + Assert.assertNotNull(future); + final ArgumentCaptor argCaptor = ArgumentCaptor.forClass(FutureCallback.class); + Mockito.verify(this.connPool).lease( +- Matchers.eq(host), Matchers.isNull(), argCaptor.capture()); ++ ArgumentMatchers.eq(host), ArgumentMatchers.isNull(), argCaptor.capture()); + final ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue(); + + final BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn); +diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java +index cab68e7..ca3618b 100644 +--- a/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java ++++ b/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java +@@ -65,7 +65,7 @@ import org.junit.Before; + import org.junit.Test; + import org.mockito.ArgumentCaptor; + import org.mockito.ArgumentMatcher; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestHttpAsyncService { +@@ -214,7 +214,7 @@ public class TestHttpAsyncService { + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + + Mockito.doThrow(new RuntimeException()).when(this.httpProcessor).process( +- Matchers.any(HttpResponse.class), Matchers.any(HttpContext.class)); ++ ArgumentMatchers.any(HttpResponse.class), ArgumentMatchers.any(HttpContext.class)); + final HttpException httpex = new HttpException(); + try { + this.protocolHandler.exception(this.conn, httpex); +@@ -248,7 +248,7 @@ public class TestHttpAsyncService { + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + + Mockito.doThrow(new IOException()).when(this.httpProcessor).process( +- Matchers.any(HttpResponse.class), Matchers.any(HttpContext.class)); ++ ArgumentMatchers.any(HttpResponse.class), ArgumentMatchers.any(HttpContext.class)); + final HttpException httpex = new HttpException(); + + this.protocolHandler.exception(this.conn, httpex); +@@ -298,7 +298,7 @@ public class TestHttpAsyncService { + final HttpRequest request = new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + Mockito.when(this.requestConsumer.getException()).thenReturn(null); + final Object data = new Object(); + Mockito.when(this.requestConsumer.getResult()).thenReturn(data); +@@ -312,7 +312,7 @@ public class TestHttpAsyncService { + Assert.assertNull(incoming); + + final ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(HttpContext.class); +- Mockito.verify(this.httpProcessor).process(Matchers.eq(request), argumentCaptor.capture()); ++ Mockito.verify(this.httpProcessor).process(ArgumentMatchers.eq(request), argumentCaptor.capture()); + final HttpContext exchangeContext = argumentCaptor.getValue(); + Assert.assertNotNull(exchangeContext); + +@@ -341,7 +341,7 @@ public class TestHttpAsyncService { + final HttpRequest request = new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + Mockito.when(this.requestConsumer.getException()).thenReturn(null); + final Object data = new Object(); + Mockito.when(this.requestConsumer.getResult()).thenReturn(data); +@@ -355,11 +355,11 @@ public class TestHttpAsyncService { + Assert.assertNull(incoming); + + Mockito.verify(this.requestConsumer).requestReceived(request); +- Mockito.verify(this.requestConsumer).requestCompleted(Matchers.any()); ++ Mockito.verify(this.requestConsumer).requestCompleted(ArgumentMatchers.any()); + Mockito.verify(this.requestHandler, Mockito.never()).handle( +- Matchers.any(), +- Matchers.any(HttpAsyncExchange.class), +- Matchers.any(HttpContext.class)); ++ ArgumentMatchers.any(), ++ ArgumentMatchers.any(HttpAsyncExchange.class), ++ ArgumentMatchers.any(HttpContext.class)); + + Assert.assertFalse(state.getPipeline().isEmpty()); + final PipelineEntry entry = state.getPipeline().remove(); +@@ -386,7 +386,7 @@ public class TestHttpAsyncService { + final HttpRequest request = new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + Mockito.when(this.requestConsumer.getException()).thenReturn(null); + final Object data = new Object(); + Mockito.when(this.requestConsumer.getResult()).thenReturn(data); +@@ -400,11 +400,11 @@ public class TestHttpAsyncService { + Assert.assertNull(incoming); + + Mockito.verify(this.requestConsumer).requestReceived(request); +- Mockito.verify(this.requestConsumer).requestCompleted(Matchers.any()); ++ Mockito.verify(this.requestConsumer).requestCompleted(ArgumentMatchers.any()); + Mockito.verify(this.requestHandler, Mockito.never()).handle( +- Matchers.any(), +- Matchers.any(HttpAsyncExchange.class), +- Matchers.any(HttpContext.class)); ++ ArgumentMatchers.any(), ++ ArgumentMatchers.any(HttpAsyncExchange.class), ++ ArgumentMatchers.any(HttpContext.class)); + + Assert.assertFalse(state.getPipeline().isEmpty()); + final PipelineEntry entry1 = state.getPipeline().remove(); +@@ -424,7 +424,7 @@ public class TestHttpAsyncService { + request.setEntity(new NStringEntity("stuff")); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + + this.protocolHandler.requestReceived(this.conn); + +@@ -446,7 +446,7 @@ public class TestHttpAsyncService { + HttpVersion.HTTP_1_1); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + + this.protocolHandler.requestReceived(this.conn); + +@@ -480,7 +480,7 @@ public class TestHttpAsyncService { + request.addHeader(HTTP.EXPECT_DIRECTIVE, HTTP.EXPECT_CONTINUE); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + + this.protocolHandler.requestReceived(this.conn); + +@@ -502,7 +502,7 @@ public class TestHttpAsyncService { + Mockito.verify(this.httpProcessor).process(request, exchangeContext); + Mockito.verify(this.requestConsumer).requestReceived(request); + Mockito.verify(this.conn, Mockito.never()).suspendInput(); +- Mockito.verify(this.conn).submitResponse(Matchers.argThat(new ArgumentMatcher() { ++ Mockito.verify(this.conn).submitResponse(ArgumentMatchers.argThat(new ArgumentMatcher() { + + @Override + public boolean matches(final HttpResponse argument) { +@@ -528,7 +528,7 @@ public class TestHttpAsyncService { + request.addHeader(HTTP.EXPECT_DIRECTIVE, HTTP.EXPECT_CONTINUE); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + + this.protocolHandler.requestReceived(this.conn); + +@@ -551,8 +551,8 @@ public class TestHttpAsyncService { + Mockito.verify(this.requestConsumer).requestReceived(request); + Mockito.verify(this.conn).suspendInput(); + Mockito.verify(expectationVerifier).verify( +- Matchers.any(HttpAsyncExchange.class), +- Matchers.eq(exchangeContext)); ++ ArgumentMatchers.any(HttpAsyncExchange.class), ++ ArgumentMatchers.eq(exchangeContext)); + } + + @Test +@@ -612,7 +612,7 @@ public class TestHttpAsyncService { + + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + + this.protocolHandler.requestReceived(this.conn); + +@@ -644,7 +644,7 @@ public class TestHttpAsyncService { + + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + + this.protocolHandler.requestReceived(this.conn); + +@@ -672,7 +672,7 @@ public class TestHttpAsyncService { + Mockito.when(this.conn.getContext()).thenReturn(this.connContext); + Mockito.when(this.conn.getHttpRequest()).thenReturn(request); + Mockito.when(this.requestHandler.processRequest( +- Matchers.eq(request), Matchers.any(HttpContext.class))).thenReturn(this.requestConsumer); ++ ArgumentMatchers.eq(request), ArgumentMatchers.any(HttpContext.class))).thenReturn(this.requestConsumer); + Mockito.when(((SessionBufferStatus) this.conn).hasBufferedInput()).thenReturn(Boolean.TRUE); + + this.protocolHandler.requestReceived(this.conn); +@@ -1019,7 +1019,7 @@ public class TestHttpAsyncService { + Assert.assertEquals(MessageState.READY, state.getResponseState()); + + Mockito.verify(this.conn).requestInput(); +- Mockito.verify(this.conn).submitResponse(Matchers.argThat(new ArgumentMatcher() { ++ Mockito.verify(this.conn).submitResponse(ArgumentMatchers.argThat(new ArgumentMatcher() { + + @Override + public boolean matches(final HttpResponse argument) { +@@ -1098,8 +1098,8 @@ public class TestHttpAsyncService { + Assert.assertNull(state.getOutgoing()); + + final ArgumentCaptor argCaptor = ArgumentCaptor.forClass(HttpAsyncExchange.class); +- Mockito.verify(this.requestHandler).handle(Matchers.same(request), +- argCaptor.capture(), Matchers.same(exchangeContext)); ++ Mockito.verify(this.requestHandler).handle(ArgumentMatchers.same(request), ++ argCaptor.capture(), ArgumentMatchers.same(exchangeContext)); + final HttpAsyncExchange exchange = argCaptor.getValue(); + + Assert.assertNotNull(exchange); +@@ -1133,9 +1133,9 @@ public class TestHttpAsyncService { + Assert.assertNotNull(response); + Assert.assertEquals(500, response.getStatusLine().getStatusCode()); + +- Mockito.verify(this.requestHandler, Mockito.never()).handle(Matchers.any(), +- Matchers.any(), Matchers.any()); +- Mockito.verify(this.conn).submitResponse(Matchers.same(response)); ++ Mockito.verify(this.requestHandler, Mockito.never()).handle(ArgumentMatchers.any(), ++ ArgumentMatchers.any(), ArgumentMatchers.any()); ++ Mockito.verify(this.conn).submitResponse(ArgumentMatchers.same(response)); + } + + @Test(expected=HttpException.class) +@@ -1314,7 +1314,7 @@ public class TestHttpAsyncService { + + this.protocolHandler.endOfInput(this.conn); + +- Mockito.verify(this.conn, Mockito.never()).setSocketTimeout(Matchers.anyInt()); ++ Mockito.verify(this.conn, Mockito.never()).setSocketTimeout(ArgumentMatchers.anyInt()); + Mockito.verify(this.conn).close(); + } + +@@ -1344,7 +1344,7 @@ public class TestHttpAsyncService { + this.protocolHandler.timeout(this.conn); + + Mockito.verify(this.conn, Mockito.atLeastOnce()).close(); +- Mockito.verify(this.conn, Mockito.never()).setSocketTimeout(Matchers.anyInt()); ++ Mockito.verify(this.conn, Mockito.never()).setSocketTimeout(ArgumentMatchers.anyInt()); + } + + @Test +@@ -1383,9 +1383,9 @@ public class TestHttpAsyncService { + this.protocolHandler.timeout(this.conn); + + Mockito.verify(this.conn).shutdown(); +- Mockito.verify(this.requestConsumer).failed(Matchers.any(SocketTimeoutException.class)); ++ Mockito.verify(this.requestConsumer).failed(ArgumentMatchers.any(SocketTimeoutException.class)); + Mockito.verify(this.requestConsumer).close(); +- Mockito.verify(this.responseProducer).failed(Matchers.any(SocketTimeoutException.class)); ++ Mockito.verify(this.responseProducer).failed(ArgumentMatchers.any(SocketTimeoutException.class)); + Mockito.verify(this.responseProducer).close(); + } + +diff --git a/httpcore/src/test/java/org/apache/http/impl/TestBHttpConnectionBase.java b/httpcore/src/test/java/org/apache/http/impl/TestBHttpConnectionBase.java +index 0277515..36d7169 100644 +--- a/httpcore/src/test/java/org/apache/http/impl/TestBHttpConnectionBase.java ++++ b/httpcore/src/test/java/org/apache/http/impl/TestBHttpConnectionBase.java +@@ -52,7 +52,7 @@ import org.apache.http.message.BasicHttpResponse; + import org.junit.Assert; + import org.junit.Before; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mock; + import org.mockito.Mockito; + import org.mockito.MockitoAnnotations; +@@ -127,13 +127,13 @@ public class TestBHttpConnectionBase { + Assert.assertFalse(conn.isOpen()); + + Mockito.verify(outStream, Mockito.times(1)).write( +- Matchers.any(), Matchers.anyInt(), Matchers.anyInt()); ++ ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt()); + Mockito.verify(socket, Mockito.times(1)).close(); + + conn.close(); + Mockito.verify(socket, Mockito.times(1)).close(); + Mockito.verify(outStream, Mockito.times(1)).write( +- Matchers.any(), Matchers.anyInt(), Matchers.anyInt()); ++ ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt()); + } + + @Test +@@ -154,7 +154,7 @@ public class TestBHttpConnectionBase { + Assert.assertFalse(conn.isOpen()); + + Mockito.verify(outStream, Mockito.never()).write( +- Matchers.any(), Matchers.anyInt(), Matchers.anyInt()); ++ ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt()); + Mockito.verify(socket, Mockito.never()).shutdownInput(); + Mockito.verify(socket, Mockito.never()).shutdownOutput(); + Mockito.verify(socket, Mockito.times(1)).close(); +@@ -251,7 +251,7 @@ public class TestBHttpConnectionBase { + public void testSetSocketTimeoutException() throws Exception { + conn.bind(socket); + +- Mockito.doThrow(new SocketException()).when(socket).setSoTimeout(Matchers.anyInt()); ++ Mockito.doThrow(new SocketException()).when(socket).setSoTimeout(ArgumentMatchers.anyInt()); + + conn.setSocketTimeout(123); + +@@ -291,9 +291,9 @@ public class TestBHttpConnectionBase { + + Assert.assertTrue(conn.awaitInput(432)); + +- Mockito.verify(socket, Mockito.never()).setSoTimeout(Matchers.anyInt()); ++ Mockito.verify(socket, Mockito.never()).setSoTimeout(ArgumentMatchers.anyInt()); + Mockito.verify(inStream, Mockito.times(1)).read( +- Matchers.any(), Matchers.anyInt(), Matchers.anyInt()); ++ ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt()); + } + + @Test +@@ -312,14 +312,14 @@ public class TestBHttpConnectionBase { + Mockito.verify(socket, Mockito.times(1)).setSoTimeout(432); + Mockito.verify(socket, Mockito.times(1)).setSoTimeout(345); + Mockito.verify(inStream, Mockito.times(1)).read( +- Matchers.any(), Matchers.anyInt(), Matchers.anyInt()); ++ ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt()); + } + + @Test + public void testAwaitInputNoData() throws Exception { + final InputStream inStream = Mockito.mock(InputStream.class); + Mockito.when(socket.getInputStream()).thenReturn(inStream); +- Mockito.when(inStream.read(Matchers.any(), Matchers.anyInt(), Matchers.anyInt())) ++ Mockito.when(inStream.read(ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())) + .thenReturn(-1); + + conn.bind(socket); +@@ -353,7 +353,7 @@ public class TestBHttpConnectionBase { + public void testStaleWhenEndOfStream() throws Exception { + final InputStream inStream = Mockito.mock(InputStream.class); + Mockito.when(socket.getInputStream()).thenReturn(inStream); +- Mockito.when(inStream.read(Matchers.any(), Matchers.anyInt(), Matchers.anyInt())) ++ Mockito.when(inStream.read(ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())) + .thenReturn(-1); + + conn.bind(socket); +@@ -366,7 +366,7 @@ public class TestBHttpConnectionBase { + public void testNotStaleWhenTimeout() throws Exception { + final InputStream inStream = Mockito.mock(InputStream.class); + Mockito.when(socket.getInputStream()).thenReturn(inStream); +- Mockito.when(inStream.read(Matchers.any(), Matchers.anyInt(), Matchers.anyInt())) ++ Mockito.when(inStream.read(ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())) + .thenThrow(new SocketTimeoutException()); + + conn.bind(socket); +@@ -379,7 +379,7 @@ public class TestBHttpConnectionBase { + public void testStaleWhenIOError() throws Exception { + final InputStream inStream = Mockito.mock(InputStream.class); + Mockito.when(socket.getInputStream()).thenReturn(inStream); +- Mockito.when(inStream.read(Matchers.any(), Matchers.anyInt(), Matchers.anyInt())) ++ Mockito.when(inStream.read(ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt())) + .thenThrow(new SocketException()); + + conn.bind(socket); +diff --git a/httpcore/src/test/java/org/apache/http/impl/io/TestSessionInOutBuffers.java b/httpcore/src/test/java/org/apache/http/impl/io/TestSessionInOutBuffers.java +index 1e85bcd..fc1a69d 100644 +--- a/httpcore/src/test/java/org/apache/http/impl/io/TestSessionInOutBuffers.java ++++ b/httpcore/src/test/java/org/apache/http/impl/io/TestSessionInOutBuffers.java +@@ -42,7 +42,7 @@ import org.apache.http.io.HttpTransportMetrics; + import org.apache.http.util.CharArrayBuffer; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestSessionInOutBuffers { +@@ -341,8 +341,8 @@ public class TestSessionInOutBuffers { + outbuffer.write(new byte[]{3, 4}); + outbuffer.flush(); + Mockito.verify(outStream, Mockito.times(1)).write( +- Matchers.any(), Matchers.anyInt(), Matchers.anyInt()); +- Mockito.verify(outStream, Mockito.never()).write(Matchers.anyInt()); ++ ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt()); ++ Mockito.verify(outStream, Mockito.never()).write(ArgumentMatchers.anyInt()); + } + + @Test +@@ -355,8 +355,8 @@ public class TestSessionInOutBuffers { + outbuffer.write(new byte[] {1, 2}); + outbuffer.write(new byte[]{3, 4}); + Mockito.verify(outStream, Mockito.times(2)).write( +- Matchers.any(), Matchers.anyInt(), Matchers.anyInt()); +- Mockito.verify(outStream, Mockito.times(2)).write(Matchers.anyInt()); ++ ArgumentMatchers.any(), ArgumentMatchers.anyInt(), ArgumentMatchers.anyInt()); ++ Mockito.verify(outStream, Mockito.times(2)).write(ArgumentMatchers.anyInt()); + } + + @Test +diff --git a/httpcore/src/test/java/org/apache/http/pool/TestConnPool.java b/httpcore/src/test/java/org/apache/http/pool/TestConnPool.java +index 30f8be2..54a7da8 100644 +--- a/httpcore/src/test/java/org/apache/http/pool/TestConnPool.java ++++ b/httpcore/src/test/java/org/apache/http/pool/TestConnPool.java +@@ -36,7 +36,7 @@ import java.util.concurrent.TimeoutException; + import org.apache.http.HttpConnection; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestConnPool { +@@ -133,8 +133,8 @@ public class TestConnPool { + Mockito.when(conn2.isOpen()).thenReturn(true); + + final LocalConnFactory connFactory = Mockito.mock(LocalConnFactory.class); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1); +- Mockito.when(connFactory.create(Matchers.eq("otherhost"))).thenReturn(conn2); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("otherhost"))).thenReturn(conn2); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 10); + final Future future1 = pool.lease("somehost", null); +@@ -233,11 +233,11 @@ public class TestConnPool { + + final HttpConnection conn1 = Mockito.mock(HttpConnection.class); + Mockito.when(conn1.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1); + + final HttpConnection conn2 = Mockito.mock(HttpConnection.class); + Mockito.when(conn2.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("otherhost"))).thenReturn(conn2); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("otherhost"))).thenReturn(conn2); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 10); + pool.setMaxPerRoute("somehost", 2); +@@ -312,7 +312,7 @@ public class TestConnPool { + Assert.assertFalse(t8.isDone()); + Assert.assertFalse(t9.isDone()); + +- Mockito.verify(connFactory, Mockito.times(3)).create(Matchers.any(String.class)); ++ Mockito.verify(connFactory, Mockito.times(3)).create(ArgumentMatchers.any(String.class)); + + pool.release(entry4, true); + pool.release(entry5, false); +@@ -325,7 +325,7 @@ public class TestConnPool { + t9.join(); + Assert.assertTrue(future9.isDone()); + +- Mockito.verify(connFactory, Mockito.times(4)).create(Matchers.any(String.class)); ++ Mockito.verify(connFactory, Mockito.times(4)).create(ArgumentMatchers.any(String.class)); + } + + @Test +@@ -338,13 +338,13 @@ public class TestConnPool { + Mockito.when(conn2.isOpen()).thenReturn(true); + final HttpConnection conn3 = Mockito.mock(HttpConnection.class); + Mockito.when(conn3.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1, conn2, conn3); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1, conn2, conn3); + + final HttpConnection conn4 = Mockito.mock(HttpConnection.class); + Mockito.when(conn4.isOpen()).thenReturn(true); + final HttpConnection conn5 = Mockito.mock(HttpConnection.class); + Mockito.when(conn5.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("otherhost"))).thenReturn(conn4, conn5); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("otherhost"))).thenReturn(conn4, conn5); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 10); + pool.setMaxPerRoute("somehost", 2); +@@ -377,8 +377,8 @@ public class TestConnPool { + Assert.assertFalse(t3.isDone()); + Assert.assertFalse(t4.isDone()); + +- Mockito.verify(connFactory, Mockito.times(2)).create(Matchers.eq("somehost")); +- Mockito.verify(connFactory, Mockito.never()).create(Matchers.eq("otherhost")); ++ Mockito.verify(connFactory, Mockito.times(2)).create(ArgumentMatchers.eq("somehost")); ++ Mockito.verify(connFactory, Mockito.never()).create(ArgumentMatchers.eq("otherhost")); + + PoolStats totals = pool.getTotalStats(); + Assert.assertEquals(0, totals.getAvailable()); +@@ -396,8 +396,8 @@ public class TestConnPool { + final LocalPoolEntry entry4 = t4.getEntry(); + Assert.assertNotNull(entry4); + +- Mockito.verify(connFactory, Mockito.times(2)).create(Matchers.eq("somehost")); +- Mockito.verify(connFactory, Mockito.times(2)).create(Matchers.eq("otherhost")); ++ Mockito.verify(connFactory, Mockito.times(2)).create(ArgumentMatchers.eq("somehost")); ++ Mockito.verify(connFactory, Mockito.times(2)).create(ArgumentMatchers.eq("otherhost")); + + totals = pool.getTotalStats(); + Assert.assertEquals(0, totals.getAvailable()); +@@ -422,8 +422,8 @@ public class TestConnPool { + final LocalPoolEntry entry6 = t6.getEntry(); + Assert.assertNotNull(entry6); + +- Mockito.verify(connFactory, Mockito.times(3)).create(Matchers.eq("somehost")); +- Mockito.verify(connFactory, Mockito.times(2)).create(Matchers.eq("otherhost")); ++ Mockito.verify(connFactory, Mockito.times(3)).create(ArgumentMatchers.eq("somehost")); ++ Mockito.verify(connFactory, Mockito.times(2)).create(ArgumentMatchers.eq("otherhost")); + + totals = pool.getTotalStats(); + Assert.assertEquals(0, totals.getAvailable()); +@@ -447,7 +447,7 @@ public class TestConnPool { + Mockito.when(conn2.isOpen()).thenReturn(true); + final HttpConnection conn3 = Mockito.mock(HttpConnection.class); + Mockito.when(conn3.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1, conn2, conn3); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1, conn2, conn3); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 10); + pool.setMaxPerRoute("somehost", 2); +@@ -481,7 +481,7 @@ public class TestConnPool { + entry2.setState("some-stuff"); + pool.release(entry2, true); + +- Mockito.verify(connFactory, Mockito.times(2)).create(Matchers.eq("somehost")); ++ Mockito.verify(connFactory, Mockito.times(2)).create(ArgumentMatchers.eq("somehost")); + + final Future future3 = pool.lease("somehost", "some-other-stuff"); + final GetPoolEntryThread t3 = new GetPoolEntryThread(future3); +@@ -492,7 +492,7 @@ public class TestConnPool { + final LocalPoolEntry entry3 = t3.getEntry(); + Assert.assertNotNull(entry3); + +- Mockito.verify(connFactory, Mockito.times(3)).create(Matchers.eq("somehost")); ++ Mockito.verify(connFactory, Mockito.times(3)).create(ArgumentMatchers.eq("somehost")); + + Mockito.verify(conn1).close(); + Mockito.verify(conn2, Mockito.never()).close(); +@@ -509,7 +509,7 @@ public class TestConnPool { + + final HttpConnection conn1 = Mockito.mock(HttpConnection.class); + Mockito.when(conn1.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 2); + +@@ -517,7 +517,7 @@ public class TestConnPool { + final LocalPoolEntry entry1 = future1.get(1, TimeUnit.SECONDS); + Assert.assertNotNull(entry1); + +- Mockito.verify(connFactory, Mockito.times(1)).create(Matchers.eq("somehost")); ++ Mockito.verify(connFactory, Mockito.times(1)).create(ArgumentMatchers.eq("somehost")); + + entry1.updateExpiry(1, TimeUnit.MILLISECONDS); + pool.release(entry1, true); +@@ -528,7 +528,7 @@ public class TestConnPool { + final LocalPoolEntry entry2 = future2.get(1, TimeUnit.SECONDS); + Assert.assertNotNull(entry2); + +- Mockito.verify(connFactory, Mockito.times(2)).create(Matchers.eq("somehost")); ++ Mockito.verify(connFactory, Mockito.times(2)).create(ArgumentMatchers.eq("somehost")); + + final PoolStats totals = pool.getTotalStats(); + Assert.assertEquals(0, totals.getAvailable()); +@@ -548,7 +548,7 @@ public class TestConnPool { + final HttpConnection conn2 = Mockito.mock(HttpConnection.class); + Mockito.when(conn2.isOpen()).thenReturn(Boolean.TRUE); + +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1, conn2); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1, conn2); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 2); + +@@ -586,7 +586,7 @@ public class TestConnPool { + + final HttpConnection conn1 = Mockito.mock(HttpConnection.class); + Mockito.when(conn1.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1); + + final LocalConnPool pool = new LocalConnPool(connFactory, 1, 1); + +@@ -633,7 +633,7 @@ public class TestConnPool { + + final HttpConnection conn1 = Mockito.mock(HttpConnection.class); + Mockito.when(conn1.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1); + + final LocalConnPool pool = new LocalConnPool(connFactory, 1, 1); + +@@ -672,7 +672,7 @@ public class TestConnPool { + final HttpConnection conn2 = Mockito.mock(HttpConnection.class); + Mockito.when(conn2.isOpen()).thenReturn(true); + +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1, conn2); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1, conn2); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 2); + +@@ -768,10 +768,10 @@ public class TestConnPool { + + final HttpConnection conn1 = Mockito.mock(HttpConnection.class); + Mockito.when(conn1.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn1); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn1); + final HttpConnection conn2 = Mockito.mock(HttpConnection.class); + Mockito.when(conn2.isOpen()).thenReturn(true); +- Mockito.when(connFactory.create(Matchers.eq("otherhost"))).thenReturn(conn2); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("otherhost"))).thenReturn(conn2); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 2); + final Future future1 = pool.lease("somehost", null); +@@ -811,7 +811,7 @@ public class TestConnPool { + Mockito.when(conn.isStale()).thenReturn(false); + + final LocalConnFactory connFactory = Mockito.mock(LocalConnFactory.class); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 10); + pool.setValidateAfterInactivity(100); +@@ -839,7 +839,7 @@ public class TestConnPool { + Mockito.when(conn.isStale()).thenReturn(false); + + final LocalConnFactory connFactory = Mockito.mock(LocalConnFactory.class); +- Mockito.when(connFactory.create(Matchers.eq("somehost"))).thenReturn(conn); ++ Mockito.when(connFactory.create(ArgumentMatchers.eq("somehost"))).thenReturn(conn); + + final LocalConnPool pool = new LocalConnPool(connFactory, 2, 10); + pool.setValidateAfterInactivity(5); +diff --git a/httpcore/src/test/java/org/apache/http/protocol/TestHttpRequestExecutor.java b/httpcore/src/test/java/org/apache/http/protocol/TestHttpRequestExecutor.java +index 0b078c3..418ced5 100644 +--- a/httpcore/src/test/java/org/apache/http/protocol/TestHttpRequestExecutor.java ++++ b/httpcore/src/test/java/org/apache/http/protocol/TestHttpRequestExecutor.java +@@ -41,7 +41,7 @@ import org.apache.http.message.BasicHttpRequest; + import org.apache.http.message.BasicHttpResponse; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestHttpRequestExecutor { +@@ -308,7 +308,7 @@ public class TestHttpRequestExecutor { + Mockito.when(conn.receiveResponseHeader()).thenReturn( + new BasicHttpResponse(HttpVersion.HTTP_1_1, 100, "Continue"), + new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK")); +- Mockito.when(conn.isResponseAvailable(Matchers.anyInt())).thenReturn(Boolean.TRUE); ++ Mockito.when(conn.isResponseAvailable(ArgumentMatchers.anyInt())).thenReturn(Boolean.TRUE); + + final HttpResponse response = executor.execute(request, conn, context); + Mockito.verify(conn).sendRequestHeader(request); +@@ -341,7 +341,7 @@ public class TestHttpRequestExecutor { + + Mockito.when(conn.receiveResponseHeader()).thenReturn( + new BasicHttpResponse(HttpVersion.HTTP_1_1, 402, "OK")); +- Mockito.when(conn.isResponseAvailable(Matchers.anyInt())).thenReturn(Boolean.TRUE); ++ Mockito.when(conn.isResponseAvailable(ArgumentMatchers.anyInt())).thenReturn(Boolean.TRUE); + + final HttpResponse response = executor.execute(request, conn, context); + Mockito.verify(conn).sendRequestHeader(request); +@@ -372,7 +372,7 @@ public class TestHttpRequestExecutor { + + Mockito.when(conn.receiveResponseHeader()).thenReturn( + new BasicHttpResponse(HttpVersion.HTTP_1_1, 101, "OK")); +- Mockito.when(conn.isResponseAvailable(Matchers.anyInt())).thenReturn(Boolean.TRUE); ++ Mockito.when(conn.isResponseAvailable(ArgumentMatchers.anyInt())).thenReturn(Boolean.TRUE); + + try { + executor.execute(request, conn, context); +@@ -400,7 +400,7 @@ public class TestHttpRequestExecutor { + + Mockito.when(conn.receiveResponseHeader()).thenReturn( + new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK")); +- Mockito.when(conn.isResponseAvailable(Matchers.anyInt())).thenReturn(Boolean.FALSE); ++ Mockito.when(conn.isResponseAvailable(ArgumentMatchers.anyInt())).thenReturn(Boolean.FALSE); + + final HttpResponse response = executor.execute(request, conn, context); + Mockito.verify(conn).sendRequestHeader(request); +diff --git a/httpcore/src/test/java/org/apache/http/protocol/TestHttpService.java b/httpcore/src/test/java/org/apache/http/protocol/TestHttpService.java +index 3bcd4bb..ae11304 100644 +--- a/httpcore/src/test/java/org/apache/http/protocol/TestHttpService.java ++++ b/httpcore/src/test/java/org/apache/http/protocol/TestHttpService.java +@@ -47,7 +47,7 @@ import org.apache.http.message.BasicHttpRequest; + import org.apache.http.message.BasicHttpResponse; + import org.junit.Assert; + import org.junit.Test; +-import org.mockito.Matchers; ++import org.mockito.ArgumentMatchers; + import org.mockito.Mockito; + + public class TestHttpService { +@@ -543,7 +543,7 @@ public class TestHttpService { + Mockito.verify(requestHandler).handle(request, response, context); + + Mockito.verify(conn).sendResponseHeader(response); +- Mockito.verify(conn, Mockito.never()).sendResponseEntity(Matchers.any()); ++ Mockito.verify(conn, Mockito.never()).sendResponseEntity(ArgumentMatchers.any()); + Mockito.verify(conn).flush(); + Mockito.verify(conn, Mockito.never()).close(); + } +@@ -580,7 +580,7 @@ public class TestHttpService { + Mockito.verify(requestHandler).handle(request, response, context); + + Mockito.verify(conn).sendResponseHeader(response); +- Mockito.verify(conn, Mockito.never()).sendResponseEntity(Matchers.any()); ++ Mockito.verify(conn, Mockito.never()).sendResponseEntity(ArgumentMatchers.any()); + Mockito.verify(conn).flush(); + Mockito.verify(conn, Mockito.never()).close(); + } +-- +2.43.0 + diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..df26947 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-9 +decision_contexts: + - osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/javapackages.functional} diff --git a/httpcomponents-core.spec b/httpcomponents-core.spec new file mode 100644 index 0000000..6743fe9 --- /dev/null +++ b/httpcomponents-core.spec @@ -0,0 +1,379 @@ +%bcond_with bootstrap + +Name: httpcomponents-core +Version: 4.4.16 +Release: 21%{?dist} +Summary: Set of low level Java HTTP transport components for HTTP services +License: Apache-2.0 +URL: http://hc.apache.org/ +BuildArch: noarch +ExclusiveArch: %{java_arches} noarch + +Source0: https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-core/%{version}/httpcomponents-core-%{version}-source-release.zip + +Patch: 0001-Port-to-mockito-2.patch +Patch: 0002-Port-to-Mockito-5.patch + +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else +BuildRequires: maven-local +BuildRequires: mvn(commons-logging:commons-logging) +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.httpcomponents:httpcomponents-parent:pom:) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) +BuildRequires: mvn(org.mockito:mockito-core) +%endif + +%description +HttpCore is a set of low level HTTP transport components that can be +used to build custom client and server side HTTP services with a +minimal footprint. HttpCore supports two I/O models: blocking I/O +model based on the classic Java I/O and non-blocking, event driven I/O +model based on Java NIO. + +The blocking I/O model may be more appropriate for data intensive, low +latency scenarios, whereas the non-blocking model may be more +appropriate for high latency scenarios where raw data throughput is +less important than the ability to handle thousands of simultaneous +HTTP connections in a resource efficient manner. + +%package javadoc +Summary: API documentation for %{name} + +%description javadoc +API documentation for %{name}. + +%prep +%autosetup -p1 + +# Tests failing without networking +sed -i '/testHttpsCreateConnection/i@org.junit.Ignore' httpcore/src/test/java/org/apache/http/impl/pool/TestBasicConnPool.java + +# Tests failing with Java 17 +sed -i '/testAwaitInputInBuffer\|testAwaitInputInSocket\|testNotStaleWhenHasData\|testWriteSmallFragmentBuffering\|testWriteSmallFragmentNoBuffering/i@org.junit.Ignore' httpcore/src/test/java/org/apache/http/impl/{TestBHttpConnectionBase,io/TestSessionInOutBuffers}.java + +%pom_remove_plugin :maven-checkstyle-plugin +%pom_remove_plugin :apache-rat-plugin +%pom_remove_plugin :maven-source-plugin +%pom_remove_plugin :maven-javadoc-plugin + +# We don't have conscrypt for testing +%pom_remove_dep :conscrypt-openjdk-uber httpcore-nio +rm httpcore-nio/src/test/java/org/apache/http/nio/integration/TestJSSEProviderIntegration.java + +# we don't need these artifacts right now +%pom_disable_module httpcore-osgi +%pom_disable_module httpcore-ab + +# OSGify modules +for module in httpcore httpcore-nio; do + %pom_xpath_remove "pom:project/pom:packaging" $module + %pom_xpath_inject "pom:project" "bundle" $module + %pom_remove_plugin :maven-jar-plugin $module + %pom_xpath_inject "pom:build/pom:plugins" " + + org.apache.felix + maven-bundle-plugin + true + + + * + + org.apache.httpcomponents.$module + <_nouses>true + + + " $module +done + +# install JARs to httpcomponents/ for compatibility reasons +# several other packages expect to find the JARs there +%mvn_file ":{*}" httpcomponents/@1 + +# tests fail with OpenJDK 21 due to mocking of sealed classes +sed -i '/testRequestTargetHostFallback()/i@org.junit.Ignore' httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java +rm httpcore-nio/src/test/java/org/apache/http/impl/nio/TestContentChannel.java + +%build +%mvn_build -- -Dmaven.compiler.release=8 + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE.txt NOTICE.txt +%doc README.txt RELEASE_NOTES.txt + +%files javadoc -f .mfiles-javadoc + +%changelog +* Tue Dec 10 2024 Mikolaj Izdebski - 4.4.16-18 +- Disable tests failing without networking + +* Fri Nov 29 2024 Mikolaj Izdebski - 4.4.16-17 +- Update javapackages test plan to f42 + +* Thu Jul 18 2024 Fedora Release Engineering - 4.4.16-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Feb 27 2024 Jiri Vanek - 4.4.16-8 +- Rebuilt for java-21-openjdk as system jdk + +* Tue Feb 20 2024 Marian Koncek - 4.4.16-7 +- Port to OpenJDK 21 + +* Wed Jan 24 2024 Fedora Release Engineering - 4.4.16-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 4.4.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Dec 12 2023 Marian Koncek - 4.4.16-4 +- Port to Mockito 5 + +* Wed Sep 20 2023 Mikolaj Izdebski - 4.4.16-3 +- Rebuild to regenerate auto-Requires on java + +* Fri Sep 01 2023 Mikolaj Izdebski - 4.4.16-2 +- Convert License tag to SPDX format + +* Wed Aug 16 2023 Mikolaj Izdebski - 4.4.16-1 +- Update to upstream version 4.4.16 + +* Tue Aug 15 2023 Mikolaj Izdebski - 4.4.13-10 +- Build with default JDK 17 + +* Thu Jul 20 2023 Fedora Release Engineering - 4.4.13-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 4.4.13-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 4.4.13-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Feb 05 2022 Jiri Vanek - 4.4.13-6 +- Rebuilt for java-17-openjdk as system jdk + +* Thu Jan 20 2022 Fedora Release Engineering - 4.4.13-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 4.4.13-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon May 17 2021 Mikolaj Izdebski - 4.4.13-3 +- Bootstrap build +- Non-bootstrap build + +* Tue Jan 26 2021 Fedora Release Engineering - 4.4.12-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 4.4.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Jiri Vanek - 4.4.12-3 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Wed Jan 29 2020 Fedora Release Engineering - 4.4.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jan 25 2020 Mikolaj Izdebski - 4.4.13-2 +- Build with OpenJDK 8 + +* Wed Jan 22 2020 Marian Koncek - 4.4.13-1 +- Update to upstream version 4.4.13 + +* Tue Nov 05 2019 Mikolaj Izdebski - 4.4.12-2 +- Mass rebuild for javapackages-tools 201902 + +* Mon Sep 16 2019 Marian Koncek - 4.4.12-1 +- Update to upstream version 4.4.12 + +* Fri May 24 2019 Mikolaj Izdebski - 4.4.11-2 +- Mass rebuild for javapackages-tools 201901 + +* Mon May 13 2019 Mikolaj Izdebski - 4.4.11-1 +- Update to upstream version 4.4.11 + +* Fri Feb 01 2019 Fedora Release Engineering - 4.4.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Dec 07 2018 Mat Booth - 4.4.10-4 +- Add patch to allow building with mockito 2 + +* Mon Jul 23 2018 Michael Simacek - 4.4.10-3 +- Fix failing tests + +* Fri Jul 13 2018 Fedora Release Engineering - 4.4.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 02 2018 Michael Simacek - 4.4.10-1 +- Update to upstream version 4.4.10 + +* Mon Mar 19 2018 Michael Simacek - 4.4.9-4 +- Fix FTBFS (weak encryption in tests) + +* Fri Feb 09 2018 Igor Gnatenko - 4.4.9-3 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 4.4.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Jan 16 2018 Michael Simacek - 4.4.9-1 +- Update to upstream version 4.4.9 + +* Sun Oct 22 2017 Michael Simacek - 4.4.8-1 +- Update to upstream version 4.4.8 + +* Tue Sep 19 2017 Michael Simacek - 4.4.7-1 +- Update to upstream version 4.4.7 + +* Fri Sep 15 2017 Mikolaj Izdebski - 4.4.6-5 +- Try to workaround test failures on ARM + +* Wed Jul 26 2017 Fedora Release Engineering - 4.4.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Feb 23 2017 Mikolaj Izdebski - 4.4.6-3 +- Remove unneeded maven-javadoc-plugin invocation + +* Tue Feb 07 2017 Michael Simacek - 4.4.6-2 +- Remove useless plugins + +* Thu Jan 12 2017 Michael Simacek - 4.4.6-1 +- Update to upstream version 4.4.6 + +* Fri Jun 24 2016 Michael Simacek - 4.4.5-2 +- Change license to just ASL 2.0 + +* Thu Jun 23 2016 Michael Simacek - 4.4.5-1 +- Update to upstream version 4.4.5 + +* Wed Jun 15 2016 Mikolaj Izdebski - 4.4.4-3 +- Regenerate build-requires + +* Wed Feb 03 2016 Fedora Release Engineering - 4.4.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Nov 2 2015 Mikolaj Izdebski - 4.4.4-1 +- Update to upstream version 4.4.4 + +* Wed Sep 9 2015 Mikolaj Izdebski - 4.4.3-1 +- Update to upstream version 4.4.3 + +* Mon Sep 07 2015 Michael Simacek - 4.4.2-1 +- Update to upstream version 4.4.2 + +* Wed Jun 17 2015 Fedora Release Engineering - 4.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Mar 19 2015 Mikolaj Izdebski - 4.4.1-1 +- Update to upstream version 4.4.1 + +* Mon Jan 19 2015 Mikolaj Izdebski - 4.4-1 +- Update to upstream version 4.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 4.3.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon May 26 2014 Mikolaj Izdebski - 4.3.2-2 +- Remove BuildRequires on maven-surefire-provider-junit4 + +* Mon May 12 2014 Mikolaj Izdebski - 4.3.2-1 +- Update to upstream version 4.3.2 + +* Tue Sep 03 2013 Michal Srb - 4.3-1 +- Update to upstream version 4.3 + +* Sat Aug 03 2013 Fedora Release Engineering - 4.2.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Jun 10 2013 Michal Srb - 4.2.4-4 +- Fix license tag (CC-BY added) + +* Fri May 17 2013 Alexander Kurtakov 4.2.4-3 +- Fix bundle plugin configuration to produce sane manifest. +- Do not duplicate javadoc files list. + +* Mon Mar 25 2013 Michal Srb - 4.2.4-2 +- Build with xmvn + +* Mon Mar 25 2013 Michal Srb - 4.2.4-1 +- Update to upstream version 4.2.4 + +* Mon Feb 25 2013 Mikolaj Izdebski - 4.2.3-3 +- Add missing BR: maven-local + +* Thu Feb 14 2013 Fedora Release Engineering - 4.2.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Dec 3 2012 Mikolaj Izdebski - 4.2.3-1 +- Update to upstream version 4.2.3 + +* Fri Oct 5 2012 Mikolaj Izdebski - 4.2.2-1 +- Update to upstream version 4.2.2 + +* Mon Aug 27 2012 Stanislav Ochotnicky - 4.2.1-3 +- Remove mockito from Requires (not needed really) +- BR on mockito is now conditional on Fedora + +* Fri Jul 27 2012 Mikolaj Izdebski - 4.2.1-2 +- Install NOTICE.txt file +- Fix javadir directory ownership +- Preserve timestamps + +* Mon Jul 23 2012 Mikolaj Izdebski - 4.2.1-1 +- Update to upstream version 4.2.1 +- Convert patches to POM macros + +* Thu Jul 19 2012 Fedora Release Engineering - 4.1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Mar 23 2012 Krzysztof Daniel 4.1.4-1 +- Update to latest upstream (4.1.4) + +* Fri Jan 13 2012 Fedora Release Engineering - 4.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Aug 16 2011 Stanislav Ochotnicky - 4.1.3-1 +- Update to latest upstream (4.1.3) + +* Tue Jul 26 2011 Stanislav Ochotnicky - 4.1.2-1 +- Update to latest upstream (4.1.2) + +* Mon Jul 4 2011 Stanislav Ochotnicky - 4.1.1-2 +- Fix forgotten add_to_maven_depmap + +* Fri Jul 1 2011 Stanislav Ochotnicky - 4.1.1-1 +- Update to latest upstream (4.1.1) +- Use new maven macros +- Tweaks according to new guidelines +- Enable tests again (seem to work OK even in koji now) + +* Tue Mar 15 2011 Severin Gehwolf 4.1-6 +- Explicitly set PrivatePackage to the empty set, so as to + export all packages. + +* Fri Mar 11 2011 Alexander Kurtakov 4.1-5 +- Bump release to fix my mistake with the release. + +* Thu Mar 10 2011 Alexander Kurtakov 4.1-3 +- Export all packages. + +* Fri Feb 18 2011 Alexander Kurtakov 4.1-2 +- Don't use basename it's part of coreutils. + +* Fri Feb 18 2011 Alexander Kurtakov 4.1-4 +- Install into %%{_javadir}/httpcomponents. We will use it for client libs too. +- Proper osgi info. + +* Wed Feb 09 2011 Fedora Release Engineering - 4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 22 2010 Stanislav Ochotnicky - 4.1-2 +- Added license to javadoc subpackage + +* Fri Dec 17 2010 Stanislav Ochotnicky - 4.1-1 +- Initial package diff --git a/plans/javapackages.fmf b/plans/javapackages.fmf new file mode 100644 index 0000000..8ba3510 --- /dev/null +++ b/plans/javapackages.fmf @@ -0,0 +1,7 @@ +summary: Run javapackages-specific tests +discover: + how: fmf + url: https://src.fedoraproject.org/tests/javapackages + ref: c9s +execute: + how: tmt diff --git a/sources b/sources new file mode 100644 index 0000000..d3ce035 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (httpcomponents-core-4.4.16-source-release.zip) = 110dd58dae9821c7e942e65655a58e2cd40279e96971067ec224d8314354c822a91e88848d46a3937534fca556859f888b230cd8ddf0150e5d6bbdc0eb5f2bbd