diff --git a/json-modules/json-path/src/test/java/com/baeldung/jsonpath/introduction/ServiceIntegrationTest.java b/json-modules/json-path/src/test/java/com/baeldung/jsonpath/introduction/ServiceIntegrationTest.java index 1a84fae3c4..a64495c0f8 100644 --- a/json-modules/json-path/src/test/java/com/baeldung/jsonpath/introduction/ServiceIntegrationTest.java +++ b/json-modules/json-path/src/test/java/com/baeldung/jsonpath/introduction/ServiceIntegrationTest.java @@ -103,11 +103,11 @@ public class ServiceIntegrationTest { @Test public void givenJsonPathWithFilterPredicate_whenReadingRootNode_thenCorrect() { - Filter expensiveFilter = Filter.filter(Criteria.where("director") + Filter directorSamMendesFilter = Filter.filter(Criteria.where("director") .contains("Sam Mendes")); - List> predicate = JsonPath.parse(jsonString) - .read("$[?]['director']", expensiveFilter); - assertEquals(predicate.size(), 2); + List> samMendesMovies = JsonPath.parse(jsonString) + .read("$[?]['director']", directorSamMendesFilter); + assertEquals(samMendesMovies.size(), 2); } } \ No newline at end of file