diff --git a/javax-servlets/pom.xml b/javax-servlets/pom.xml
index 1934102c68..7407666309 100644
--- a/javax-servlets/pom.xml
+++ b/javax-servlets/pom.xml
@@ -39,7 +39,7 @@
3.1.0
- 4.5.2
+ 4.5.3
\ No newline at end of file
diff --git a/javax-servlets/src/test/java/com/baeldung/servlets/FormServletLiveTest.java b/javax-servlets/src/test/java/com/baeldung/servlets/FormServletLiveTest.java
index dca725ae32..120a555c5b 100644
--- a/javax-servlets/src/test/java/com/baeldung/servlets/FormServletLiveTest.java
+++ b/javax-servlets/src/test/java/com/baeldung/servlets/FormServletLiveTest.java
@@ -1,24 +1,24 @@
package com.baeldung.servlets;
-import static org.junit.Assert.assertEquals;
-
-import java.util.ArrayList;
-import java.util.List;
-
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.junit.Test;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+
public class FormServletLiveTest {
@Test
public void whenPostRequestUsingHttpClient_thenCorrect() throws Exception {
- HttpClient client = new DefaultHttpClient();
+ HttpClient client = HttpClientBuilder.create().build();
HttpPost method = new HttpPost("http://localhost:8080/calculateServlet");
List nvps = new ArrayList<>();
diff --git a/json-path/pom.xml b/json-path/pom.xml
index e81bc1dcf9..8384ba68ed 100644
--- a/json-path/pom.xml
+++ b/json-path/pom.xml
@@ -23,6 +23,6 @@
- 2.2.0
+ 2.4.0
\ No newline at end of file
diff --git a/json-path/src/test/java/com/baeldung/jsonpath/introduction/OperationIntegrationTest.java b/json-path/src/test/java/com/baeldung/jsonpath/introduction/OperationIntegrationTest.java
index cb5c695cd8..855f524dbe 100644
--- a/json-path/src/test/java/com/baeldung/jsonpath/introduction/OperationIntegrationTest.java
+++ b/json-path/src/test/java/com/baeldung/jsonpath/introduction/OperationIntegrationTest.java
@@ -1,10 +1,10 @@
package com.baeldung.jsonpath.introduction;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.not;
-
+import com.jayway.jsonpath.Criteria;
+import com.jayway.jsonpath.DocumentContext;
+import com.jayway.jsonpath.Filter;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.Predicate;
import org.junit.Test;
import java.io.InputStream;
@@ -12,15 +12,14 @@ import java.util.List;
import java.util.Map;
import java.util.Scanner;
-import com.jayway.jsonpath.Criteria;
-import com.jayway.jsonpath.DocumentContext;
-import com.jayway.jsonpath.Filter;
-import com.jayway.jsonpath.JsonPath;
-import com.jayway.jsonpath.Predicate;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
public class OperationIntegrationTest {
- InputStream jsonInputStream = this.getClass().getClassLoader().getResourceAsStream("intro_api.json");
- String jsonDataSourceString = new Scanner(jsonInputStream, "UTF-8").useDelimiter("\\Z").next();
+ private InputStream jsonInputStream = this.getClass().getClassLoader().getResourceAsStream("intro_api.json");
+ private String jsonDataSourceString = new Scanner(jsonInputStream, "UTF-8").useDelimiter("\\Z").next();
@Test
public void givenJsonPathWithoutPredicates_whenReading_thenCorrect() {
@@ -46,12 +45,7 @@ public class OperationIntegrationTest {
@Test
public void givenJsonPathWithCustomizedPredicate_whenReading_thenCorrect() {
- Predicate expensivePredicate = new Predicate() {
- public boolean apply(PredicateContext context) {
- String value = context.item(Map.class).get("price").toString();
- return Float.valueOf(value) > 20.00;
- }
- };
+ Predicate expensivePredicate = context -> Float.valueOf(context.item(Map.class).get("price").toString()) > 20.00;
List