diff --git a/libraries-2/README.md b/libraries-2/README.md
index eb45a3e426..edf513c6ee 100644
--- a/libraries-2/README.md
+++ b/libraries-2/README.md
@@ -14,11 +14,9 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [Guide to Java Parallel Collectors Library](https://www.baeldung.com/java-parallel-collectors)
- [Templating with Handlebars](https://www.baeldung.com/handlebars)
- [A Guide to Crawler4j](https://www.baeldung.com/crawler4j)
-- [Decode an OkHttp JSON Response](https://www.baeldung.com/okhttp-json-response)
- [Key Value Store with Chronicle Map](https://www.baeldung.com/java-chronicle-map)
- [Guide to MapDB](https://www.baeldung.com/mapdb)
- [A Guide to Apache Mesos](https://www.baeldung.com/apache-mesos)
- [JasperReports with Spring](https://www.baeldung.com/spring-jasper)
-- [Jetty ReactiveStreams HTTP Client](https://www.baeldung.com/jetty-reactivestreams-http-client)
- More articles [[<-- prev]](/libraries)
diff --git a/libraries-2/pom.xml b/libraries-2/pom.xml
index 474ff563c2..3aa36c3f90 100644
--- a/libraries-2/pom.xml
+++ b/libraries-2/pom.xml
@@ -75,28 +75,7 @@
-
-
- com.squareup.okhttp3
- okhttp
- ${okhttp.version}
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson.version}
-
-
- com.google.code.gson
- gson
- ${gson.version}
-
-
- com.squareup.okhttp3
- mockwebserver
- ${mockwebserver.version}
- test
-
+
edu.uci.ics
crawler4j
@@ -151,9 +130,6 @@
2.1.4.RELEASE
0.28.3
1.1.0
- 3.14.2
- 2.8.5
- 3.14.2
4.1.2
6.6.0
5.1.9.RELEASE
diff --git a/libraries-2/src/test/java/com/baeldung/okhttp/ResponseDecoderUnitTest.java b/libraries-2/src/test/java/com/baeldung/okhttp/ResponseDecoderUnitTest.java
deleted file mode 100644
index 11a295031a..0000000000
--- a/libraries-2/src/test/java/com/baeldung/okhttp/ResponseDecoderUnitTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.baeldung.okhttp;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.Gson;
-import okhttp3.OkHttpClient;
-import okhttp3.Request;
-import okhttp3.ResponseBody;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import java.io.InputStreamReader;
-
-public class ResponseDecoderUnitTest {
-
- @Rule public ExpectedException exceptionRule = ExpectedException.none();
-
- @Rule public MockWebServer server = new MockWebServer();
-
- SimpleEntity sampleResponse;
-
- MockResponse mockResponse;
-
- OkHttpClient client;
-
- @Before
- public void setUp() {
- sampleResponse = new SimpleEntity("Baeldung");
- client = new OkHttpClient.Builder().build();
- mockResponse = new MockResponse()
- .setResponseCode(200)
- .setHeader("Content-Type", "application/json")
- .setBody(new Gson().toJson(sampleResponse));
- }
-
- @Test
- public void givenJacksonDecoder_whenGetStringOfResponse_thenExpectSimpleEntity() throws Exception {
- server.enqueue(mockResponse);
- Request request = new Request.Builder()
- .url(server.url(""))
- .build();
- ResponseBody responseBody = client
- .newCall(request)
- .execute()
- .body();
-
- Assert.assertNotNull(responseBody);
- Assert.assertNotEquals(0, responseBody.contentLength());
-
- ObjectMapper objectMapper = new ObjectMapper();
- SimpleEntity entity = objectMapper.readValue(responseBody.string(), SimpleEntity.class);
-
- Assert.assertNotNull(entity);
- Assert.assertEquals(sampleResponse.getName(), entity.getName());
- }
-
- @Test
- public void givenGsonDecoder_whenGetByteStreamOfResponse_thenExpectSimpleEntity() throws Exception {
- server.enqueue(mockResponse);
- Request request = new Request.Builder()
- .url(server.url(""))
- .build();
- ResponseBody responseBody = client
- .newCall(request)
- .execute()
- .body();
-
- Assert.assertNotNull(responseBody);
- Assert.assertNotEquals(0, responseBody.contentLength());
-
- Gson gson = new Gson();
- SimpleEntity entity = gson.fromJson(new InputStreamReader(responseBody.byteStream()), SimpleEntity.class);
-
- Assert.assertNotNull(entity);
- Assert.assertEquals(sampleResponse.getName(), entity.getName());
- }
-
- @Test
- public void givenGsonDecoder_whenGetStringOfResponse_thenExpectSimpleEntity() throws Exception {
- server.enqueue(mockResponse);
- Request request = new Request.Builder()
- .url(server.url(""))
- .build();
- ResponseBody responseBody = client
- .newCall(request)
- .execute()
- .body();
-
- Assert.assertNotNull(responseBody);
-
- Gson gson = new Gson();
- SimpleEntity entity = gson.fromJson(responseBody.string(), SimpleEntity.class);
-
- Assert.assertNotNull(entity);
- Assert.assertEquals(sampleResponse.getName(), entity.getName());
- }
-
-}
diff --git a/libraries-2/src/test/java/com/baeldung/okhttp/SimpleEntity.java b/libraries-2/src/test/java/com/baeldung/okhttp/SimpleEntity.java
deleted file mode 100644
index 211e43e556..0000000000
--- a/libraries-2/src/test/java/com/baeldung/okhttp/SimpleEntity.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.baeldung.okhttp;
-
-public class SimpleEntity {
- protected String name;
-
- public SimpleEntity(String name) {
- this.name = name;
- }
-
- //no-arg constructor, getters and setters here
-
- public SimpleEntity() {
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}