### Question:
JsonUtils { public static String jsonSchemaValidation(String jsonStr, String jsonSchemaPath) throws ValidationException { try { logger.debug("JSON document to be validated: {}", jsonStr); JsonNode document = JsonLoader.fromString(jsonStr); JsonNode schema = JsonLoader.fromPath(jsonSchemaPath); JsonSchemaFactory factory = JsonSchemaFactory.byDefault(); JsonValidator validator = factory.getValidator(); ProcessingReport report = validator.validate(schema, document); logger.debug("JSON schema validation report: {}", report); return report.toString(); } catch (IOException e) { logger.debug("IOException performing JSON schema validation on document:", e); throw new ValidationException(e.getMessage()); } catch (ProcessingException e) { logger.debug("ProcessingException performing JSON schema validation on document:", e); throw new ValidationException(e.getMessage()); } }  static String xml2json(String xml, Boolean pretty); static String xml2json(String xml); static String json2xml(String jsonStr, Boolean pretty); static String toXMLString(Object obj, String tagName); static String json2xml(String jsonStr); static String prettyJson(String jsonStr); static Iterator<String> getJsonIterator(String jsonStr); static String getJsonRootProperty(String jsonStr); static String getJsonValue(String jsonStr, String keys); static String getJsonNodeValue(String jsonStr, String keys); static int getJsonIntValue(String jsonStr, String keys); static boolean getJsonBooleanValue(String jsonStr, String keys); static String getJsonParamValue(String jsonStr, String keys, String name); static String getJsonParamValue(String jsonStr, String keys, String name, int index); static String getJsonValueForKey(String jsonStr, String key); static String getJsonValueForKey(JSONObject jsonObj, String key); static Integer getJsonIntValueForKey(JSONObject jsonObj, String key); static Boolean getJsonBooleanValueForKey(JSONObject jsonObj, String key); static Boolean jsonValueExists(String jsonStr, String keys); static String addJsonValue(String jsonStr, String keys, String value); static String updJsonValue(String jsonStr, String keys, String newValue); static String delJsonValue(String jsonStr, String keys); Map<String, String> jsonStringToMap(DelegateExecution execution, String entry); Map<String, String> entryArrayToMap(DelegateExecution execution, String entryArray, String keyNode,
            String valueNode); Map<String, String> entryArrayToMap(String entryArray, String keyNode, String valueNode); List<String> StringArrayToList(Execution execution, String jsonArray); List<String> StringArrayToList(String jsonArray); List<String> StringArrayToList(JSONArray jsonArray); static boolean jsonElementExist(String jsonStr, String keys); static String jsonSchemaValidation(String jsonStr, String jsonSchemaPath);  }### Answer:
@Test public void jsonSchemaValidation_ExceptionTest() throws IOException, ValidationException { expectedException.expect(ValidationException.class); String response = this.getJson("SDNCServiceResponseExample.json"); String isExist = JsonUtils.jsonSchemaValidation(response, fileLocation); }