@Test public void should_parse_deep_inner_objects() { final Plugin fakePlugin = createFakePlugin("<a>" + "<b>" + "<c>" + "<d>" + "<e>e1</e>" + "</d>" + "</c>" + "</b>" + "</a>"); final Map<String, Object> config = MavenConfigurationExtractor.extract((Xpp3Dom) fakePlugin.getConfiguration()); final Map<String, Object> e = new HashMap<>(); e.put("e", "e1"); final Map<String, Object> d = new HashMap<>(); d.put("d", e); final Map<String, Object> c = new HashMap<>(); c.put("c", d); final Map<String, Object> expected = new HashMap<>(); expected.put("b", c); assertThat(config) .containsEntry("a", expected); }
public static Map<String, Object> extract(Xpp3Dom root) { if (root == null) { return new HashMap<>(); } return getElement(root); }
MavenConfigurationExtractor { public static Map<String, Object> extract(Xpp3Dom root) { if (root == null) { return new HashMap<>(); } return getElement(root); } }
MavenConfigurationExtractor { public static Map<String, Object> extract(Xpp3Dom root) { if (root == null) { return new HashMap<>(); } return getElement(root); } private  MavenConfigurationExtractor(); }
MavenConfigurationExtractor { public static Map<String, Object> extract(Xpp3Dom root) { if (root == null) { return new HashMap<>(); } return getElement(root); } private  MavenConfigurationExtractor(); static Map<String, Object> extract(Xpp3Dom root); }
MavenConfigurationExtractor { public static Map<String, Object> extract(Xpp3Dom root) { if (root == null) { return new HashMap<>(); } return getElement(root); } private  MavenConfigurationExtractor(); static Map<String, Object> extract(Xpp3Dom root);  }