import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Objects; import static org.junit.jupiter.api.Assertions.*; class HttpApiTest { @Test void sendHttpGETRequest() { assertDoesNotThrow(() -> HttpApi.sendHttpGETRequest("https://httpbin.org/get")); try { assertTrue(Objects.requireNonNull(HttpApi.sendHttpGETRequest("https://httpbin.org/get")).contains("args")); } catch (IOException e) { e.printStackTrace(); } } }