### Question:
AabResGuardXmlParser { public AabResGuardConfig parse() throws DocumentException { AabResGuardConfig aabResGuardConfig = new AabResGuardConfig(); SAXReader reader = new SAXReader(); Document doc = reader.read(configPath.toFile()); Element root = doc.getRootElement(); for (Iterator i = root.elementIterator("issue"); i.hasNext(); ) { Element element = (Element) i.next(); String id = element.attributeValue("id"); if (id == null || !id.equals("whitelist")) { continue; } String isActive = element.attributeValue("isactive"); if (isActive != null && isActive.equals("true")) { aabResGuardConfig.setUseWhiteList(true); } for (Iterator rules = element.elementIterator("path"); rules.hasNext(); ) { Element ruleElement = (Element) rules.next(); String rule = ruleElement.attributeValue("value"); if (rule != null) { aabResGuardConfig.addWhiteList(rule); } } } aabResGuardConfig.setFileFilter(new FileFilterXmlParser(configPath).parse()); aabResGuardConfig.setStringFilterConfig(new StringFilterXmlParser(configPath).parse()); return aabResGuardConfig; } AabResGuardXmlParser(Path configPath); AabResGuardConfig parse();  }### Answer:
@Test public void test() throws DocumentException { AabResGuardXmlParser parser = new AabResGuardXmlParser(loadResourceFile("demo/config.xml").toPath()); AabResGuardConfig config = parser.parse(); assert config != null; assert config.isUseWhiteList(); assert config.getFileFilter() != null; assert config.getFileFilter().getRules().size() == 2; assert config.getWhiteList().size() == 1; }