### Question:
HarUtils { public static void validateJSON(String jsonInString) throws Exception { if (StringUtils.isNotBlank(jsonInString)) { try { objectMapper.readTree(jsonInString); } catch (Exception ex) { throw new Exception("JSON validation failed"); } } else { throw new Exception("JSON validation failed"); } }  static String toPrettyJsonString(Object value); static String toJsonString(Object value); static Map<String, Object> fromJsonString(String json); static boolean isNotNull(T object); static boolean isNull(T object); static String defaultIfNull(T obj, String str); static List<T> defaultIfNull(List<T> obj); static void validateJSON(String jsonInString); List<HarQueryString> processQueryStrings(List<HarQueryString> harQueryStrings); List<HarCookie> processCookies(HarRequest harRequest); List<HarParam> processParams(HarPostData postData); List<HarHeader> processHeaders(HarRequest harRequest); String defaultMimeType(final String mimeType);  }### Answer:
@Test void testValidateJSON() { Exception exception = assertThrows(Exception.class, () -> HarUtils.validateJSON("")); assertEquals("JSON validation failed", exception.getMessage()); exception = assertThrows(Exception.class, () -> HarUtils.validateJSON("{")); assertEquals("JSON validation failed", exception.getMessage()); assertDoesNotThrow(() -> HarUtils.validateJSON("{}")); }