RuleSet implements ChecksumAware { public int size() { return rules.size(); } private  RuleSet(final RuleSetBuilder builder);  RuleSet(final RuleSet rs); @Deprecated List<String> getExcludePatterns(); int size(); Collection<Rule> getRules(); Rule getRuleByName(String ruleName); boolean applies(File file); void start(RuleContext ctx); void apply(List<? extends Node> acuList, RuleContext ctx); static boolean applies(Rule rule, LanguageVersion languageVersion); void end(RuleContext ctx); @Override boolean equals(Object o); @Override int hashCode(); String getFileName(); String getName(); String getDescription(); @Deprecated List<String> getIncludePatterns(); List<Pattern> getFileExclusions(); List<Pattern> getFileInclusions(); @Deprecated boolean usesDFA(Language language); @Deprecated boolean usesTypeResolution(Language language); @Deprecated boolean usesMultifile(Language language); void removeDysfunctionalRules(Collection<Rule> collector); @Override long getChecksum();  }
@Test public void testAddRuleSet() { RuleSet set1 = createRuleSetBuilder("ruleset1") .addRule(new MockRule("name", "desc", "msg", "rulesetname")) .build(); RuleSet set2 = createRuleSetBuilder("ruleset2") .addRule(new MockRule("name2", "desc", "msg", "rulesetname")) .addRuleSet(set1) .build(); assertEquals("ruleset size wrong", 2, set2.size()); }