XmlReader { public ImmutableMap<String, String> getMap(String xpathToRoot, String keyAttributeName, String valueAttributeName) { ImmutableMap.Builder<String, String> b = ImmutableMap.builder(); List<HierarchicalConfiguration<ImmutableNode>> fields = xmlConfiguration.childConfigurationsAt(xpathToRoot); for (HierarchicalConfiguration sub : fields) { b.put(sub.getString(keyAttributeName), sub.getString(valueAttributeName)); } return b.build(); } XmlReader(XMLConfiguration xmlConfiguration); Multimap<String, String> read(); String getString(String key); List<String> getList(String key); ImmutableMap<String, String> getMap(String xpathToRoot, String keyAttributeName, String valueAttributeName); String[] getStringArray(String query); Configuration configurationAt(String key); Document getDocument();  }
@Test public void readDefaultFilterFactors() { subject = dataFileHub.getRnaSeqBaselineExperimentFiles(E_MTAB_2812).baselineExperimentFiles.factors.get(); assertThat(subject.getMap("defaultFilterFactors", "type", "value").size(), is(2)); }