RuleSetFactoryCompatibility { void addFilterRuleMoved(String language, String oldRuleset, String newRuleset, String ruleName) { filters.add(RuleSetFilter.ruleMoved(language, oldRuleset, newRuleset, ruleName)); } RuleSetFactoryCompatibility(); Reader filterRuleSetFile(InputStream stream);  }
@Test public void testCorrectOldReference() throws Exception { final String ruleset = "<?xml version=\"1.0\"?>\n" + "\n" + "<ruleset name=\"Test\"\n" + " xmlns=\"http: + " xmlns:xsi=\"http: + " xsi:schemaLocation=\"http: + " <description>Test</description>\n" + "\n" + " <rule ref=\"rulesets/dummy/notexisting.xml/DummyBasicMockRule\" />\n" + "</ruleset>\n"; RuleSetFactory factory = RulesetsFactoryUtils.defaultFactory(); factory.getCompatibilityFilter().addFilterRuleMoved("dummy", "notexisting", "basic", "DummyBasicMockRule"); RuleSet createdRuleSet = createRulesetFromString(ruleset, factory); Assert.assertNotNull(createdRuleSet.getRuleByName("DummyBasicMockRule")); }