@Test public void testInvalidType() { assertThatThrownBy(() -> MapListTreeFlattener.flatten(new HashSet<>())) .isInstanceOf(RuntimeException.class); }
public static Map<String, Object> flatten(Object root) { Map<String, Object> results = new HashMap<>(); flatten("", root, results); return results; }
MapListTreeFlattener { public static Map<String, Object> flatten(Object root) { Map<String, Object> results = new HashMap<>(); flatten("", root, results); return results; } }
MapListTreeFlattener { public static Map<String, Object> flatten(Object root) { Map<String, Object> results = new HashMap<>(); flatten("", root, results); return results; }  }
MapListTreeFlattener { public static Map<String, Object> flatten(Object root) { Map<String, Object> results = new HashMap<>(); flatten("", root, results); return results; }  static Map<String, Object> flatten(Object root); }
MapListTreeFlattener { public static Map<String, Object> flatten(Object root) { Map<String, Object> results = new HashMap<>(); flatten("", root, results); return results; }  static Map<String, Object> flatten(Object root);  }