### Question:
JsonPathUtil { public boolean pathExists(String json, String jsonPath) { return JsonPath.using(conf).parse(json).<ArrayNode>read(jsonPath).size() != 0; } private  JsonPathUtil(); static JsonPathUtil getInstance(); boolean pathExists(String json, String jsonPath); Optional<String> locateResult(String json, String jsonPath); List<String> locateResultList(String json, String jsonPath); List<String> getPathList(String json, String jsonPath);  }### Answer:
@Test public void pathExistsTest() { assertEquals("test is found", JsonPathUtil.getInstance().pathExists(json, "$.test"), true); assertEquals("nothing is not found", JsonPathUtil.getInstance().pathExists(json, "$.nothing"), false); }