@Test public void should_parse_list_of_elements() { final Plugin fakePlugin = createFakePlugin("<a>" + "<b>" + "<c>c1</c><c>c2</c>" + "</b>" + "</a>"); final Map<String, Object> config = MavenConfigurationExtractor.extract((Xpp3Dom) fakePlugin.getConfiguration()); final Map<String, Object> expectedC = new HashMap<>(); expectedC.put("c", Arrays.asList("c1", "c2")); final Map<String, Object> expected = new HashMap<>(); expected.put("b", expectedC); 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);  }