### Question:
MapUtil { public static Map<String, Object> convertToHashMap(Map<String, Object> target){ for(Map.Entry<String, Object> tmp : target.entrySet()){ if (null == tmp.getValue()) { continue; } if(tmp.getValue().getClass().equals(LinkedTreeMap.class) || tmp.getValue().getClass().equals(LinkedHashTreeMap.class)){ Map<String, Object> convert = convertToHashMap((Map)tmp.getValue()); HashMap<String, Object> hashMap = new HashMap<>(convert.size()); hashMap.putAll(convert); tmp.setValue(hashMap); } } return target; }  static Map<String, Object> convertToHashMap(Map<String, Object> target); static Map<String,Object> objectToMap(Object obj); static T jsonStrToObject(String jsonStr, Class<T> clazz);  }### Answer:
@Test public void testConvertToHashMap() { Map<String, Object> target = new HashMap<>(); LinkedTreeMap treeMap = new LinkedTreeMap<>(); treeMap.put("key1", "val1"); target.put("key11", treeMap); Map<String, Object> result = MapUtil.convertToHashMap(target); Assert.assertEquals(result, new HashMap<String, Object>() {{ put("key11", new HashMap<String, Object>(){{ put("key1", "val1");} }); }}); }