XPathRule extends AbstractRule { @Override public Rule deepCopy() { XPathRule rule = (XPathRule) super.deepCopy(); rule.attrLogger = this.attrLogger; return rule; } XPathRule();  XPathRule(final String xPath);  XPathRule(XPathVersion version, String expression); @Override Rule deepCopy(); XPathVersion getVersion(); String getXPathExpression(); @Deprecated void setXPath(final String xPath); @Deprecated void setVersion(final String version); @Override void apply(List<? extends Node> nodes, RuleContext ctx); @Deprecated void evaluate(final Node node, final RuleContext data); @Override List<String> getRuleChainVisits(); @Override String dysfunctionReason(); @Deprecated
    static final StringProperty XPATH_DESCRIPTOR; @Deprecated
    static final EnumeratedProperty<String> VERSION_DESCRIPTOR; }
@Test public void testListAttributeDeprecation20() { XPathRule xpr = makeRuleWithList("TestRuleWithListAccess"); loggingRule.clear(); RuleContext ctx = new RuleContext(); ctx.setLanguageVersion(LanguageRegistry.getLanguage(DummyLanguageModule.NAME).getDefaultVersion()); DummyNode firstNode = newNodeWithList(); eval(ctx, xpr, firstNode); assertEquals(1, ctx.getReport().size()); String log = loggingRule.getLog(); assertThat(log, Matchers.containsString("Use of deprecated attribute 'dummyNode/@List' by XPath rule 'TestRuleWithListAccess'")); loggingRule.clear(); eval(ctx, xpr, newNodeWithList()); assertEquals(2, ctx.getReport().size()); assertEquals("", loggingRule.getLog()); eval(ctx, xpr.deepCopy(), newNodeWithList()); assertEquals(3, ctx.getReport().size()); assertEquals("", loggingRule.getLog()); XPathRule otherRule = makeRuleWithList("OtherTestRuleWithListAccess"); otherRule.setRuleSetName("rset.xml"); eval(ctx, otherRule, firstNode); assertEquals(4, ctx.getReport().size()); log = loggingRule.getLog(); assertThat(log, Matchers.containsString("Use of deprecated attribute 'dummyNode/@List' by XPath rule 'OtherTestRuleWithListAccess' (in ruleset 'rset.xml')")); }