### Question:
SearchUtils { public static Map<String, Object> convertToJsonMap(String jsonData) throws IOException { if (jsonData == null) return null; ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(jsonData, new TypeReference<Map<String, Object>>() { }); }  static Properties loadProperties(String path); static String trimToNull(String value); static List<String> safeList(List<String> values); static boolean isBlank(String value); static boolean isBlank(Object value); static String convertJsonMapToString(Map<String, Object> jsonMapValue); static DateFormat getISODateFormat(); static Date dateFromISOString(String string, boolean silent); static boolean isDateAfter(Object date, int thresholdInMinutes); static Map<String, Object> convertToJsonMap(String jsonData); static Integer getIntegerFromJsonMap(Map<String, Object> map, String key); @SuppressWarnings("unchecked") static List<String> getListOfStringsFromJsonMap(Map<String, Object> map, String key); static void mergeJsonMaps(Map<String, Object> source, Map<String, Object> target); static Map<String, Object> collapseURLParams(MultivaluedMap<String, String> params); static boolean isMysqlDialect(String databaseProductName);  }### Answer:
@SuppressWarnings("unchecked") @Test public void convertToJsonMap() throws JsonParseException, JsonMappingException, IOException { Assert.assertNull(SearchUtils.convertToJsonMap(null)); try { SearchUtils.convertToJsonMap(""); Assert.fail("IOException expected"); } catch (IOException e) { } try { SearchUtils.convertToJsonMap("sdfqwrewr"); Assert.fail("JsonParseException expected"); } catch (JsonParseException e) { } try { SearchUtils.convertToJsonMap("{aers"); Assert.fail("JsonParseException expected"); } catch (JsonParseException e) { } try { SearchUtils.convertToJsonMap("{ \"dsdsd\": true,}"); Assert.fail("JsonParseException expected"); } catch (JsonParseException e) { } { Map<String, Object> m = SearchUtils .convertToJsonMap("{ \"test\": true, \"int\":10, \"str\":\"string\", \"datestring\":\"1972-01-24T20:21:38.465+0000\"}"); Assert.assertEquals(4, m.size()); Assert.assertEquals(true, m.get("test")); Assert.assertEquals(10, m.get("int")); Assert.assertEquals("string", m.get("str")); Assert.assertEquals("1972-01-24T20:21:38.465+0000", m.get("datestring")); } { Map<String, Object> m = SearchUtils .convertToJsonMap("{ \"test\": [true, 10, \"string\", \"1972-01-24T20:21:38.465+0000\"]}"); Assert.assertEquals(1, m.size()); List<Object> l = (List<Object>) m.get("test"); Assert.assertEquals(true, l.get(0)); Assert.assertEquals(10, l.get(1)); Assert.assertEquals("string", l.get(2)); Assert.assertEquals("1972-01-24T20:21:38.465+0000", l.get(3)); } }