### Question:
StringToMap { public static String extract(String path, Map<String, Object> map) { return extract(path.split("\\."), 0, map); }  static Map<String, Object> update(String path, String update); static void update(String path, String update, Map<String, Object> map); static String extract(String path, Map<String, Object> map); static void remove(String path, Map<String, Object> map);  }### Answer:
@Test public void testExtract() { Map<String, Object> level3 = new HashMap<>(); level3.put("bar", "value"); Map<String, Object> level2 = new HashMap<>(); level2.put("foo", level3); Map<String, Object> map = new HashMap<>(); map.put("test", level2); String extracted = StringToMap.extract("test.foo.bar", map); assertEquals("value", extracted); }