From aa8016e8388118485188f0cc95c12950ffc35d96 Mon Sep 17 00:00:00 2001 From: Harry9656 Date: Thu, 4 Apr 2024 07:05:25 +0200 Subject: [PATCH] [JAVA-32852] Fix UrlCheckerIntegrationTest (#16292) --- .../java/com/baeldung/url/UrlCheckerIntegrationTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/url/UrlCheckerIntegrationTest.java b/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/url/UrlCheckerIntegrationTest.java index e3100deebc..edafe242c1 100644 --- a/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/url/UrlCheckerIntegrationTest.java +++ b/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/url/UrlCheckerIntegrationTest.java @@ -11,28 +11,28 @@ public class UrlCheckerIntegrationTest { @Test public void givenValidUrl_WhenUsingHEAD_ThenReturn200() throws IOException { UrlChecker tester = new UrlChecker(); - int responseCode = tester.getResponseCodeForURLUsingHead("http://www.example.com"); + int responseCode = tester.getResponseCodeForURLUsingHead("https://httpbin.org/status/200"); assertEquals(200, responseCode); } @Test public void givenInvalidIUrl_WhenUsingHEAD_ThenReturn404() throws IOException { UrlChecker tester = new UrlChecker(); - int responseCode = tester.getResponseCodeForURLUsingHead("http://www.example.com/xyz"); + int responseCode = tester.getResponseCodeForURLUsingHead("https://httpbin.org/status/404"); assertEquals(404, responseCode); } @Test public void givenValidUrl_WhenUsingGET_ThenReturn200() throws IOException { UrlChecker tester = new UrlChecker(); - int responseCode = tester.getResponseCodeForURL("http://www.example.com"); + int responseCode = tester.getResponseCodeForURL("https://httpbin.org/status/200"); assertEquals(200, responseCode); } @Test public void givenInvalidIUrl_WhenUsingGET_ThenReturn404() throws IOException { UrlChecker tester = new UrlChecker(); - int responseCode = tester.getResponseCodeForURL("http://www.example.com/xyz"); + int responseCode = tester.getResponseCodeForURL("https://httpbin.org/status/404"); assertEquals(404, responseCode); }