### Question:
HarUtils { public static String toJsonString(Object value) throws JsonProcessingException { return objectMapper.writeValueAsString(value); }  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 testToJsonString() { Map<String, String> h = new HashMap<>(); h.put("foo", "foo"); String result = assertDoesNotThrow(() -> HarUtils.toJsonString(h)); assertEquals("{\"foo\":\"foo\"}", result); }