summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryProdHostTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryProdHostTest.java')
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryProdHostTest.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryProdHostTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryProdHostTest.java
index 3d7ede90..170ddff9 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryProdHostTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryProdHostTest.java
@@ -11,12 +11,13 @@ import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateEncodingException;
import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.util.EntityUtils;
+import org.apache.hc.client5.http.ClientProtocolException;
+import org.apache.hc.client5.http.classic.methods.HttpGet;
+import org.apache.hc.client5.http.classic.methods.HttpUriRequest;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
+import org.apache.hc.core5.http.ParseException;
+import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider;
import org.junit.Assert;
import org.junit.Before;
@@ -73,7 +74,7 @@ public class HttpClientFactoryProdHostTest {
@DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void getCustomClientX509AuthWithHsmFacadeTrustStore() throws EaafException, ClientProtocolException,
IOException, KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException,
- CertificateEncodingException {
+ CertificateEncodingException, ParseException {
System.setProperty("javax.net.debug", "ssl:handshake");
final HttpClientConfiguration clientConfig = new HttpClientConfiguration(
@@ -89,7 +90,7 @@ public class HttpClientFactoryProdHostTest {
//perform test request
final HttpUriRequest httpGet3 = new HttpGet("https://vollmachten.egiz.gv.at/mms-eid-test/services/GetMandatesService?wsdl");
final CloseableHttpResponse httpResp3 = client.execute(httpGet3);
- Assert.assertEquals("http statusCode", 200, httpResp3.getStatusLine().getStatusCode());
+ Assert.assertEquals("http statusCode", 200, httpResp3.getCode());
String body = EntityUtils.toString(httpResp3.getEntity());
assertFalse("no http body", body.isEmpty());
assertTrue("no WSDL", body.contains("name=\"GetMandatesOperation\""));