RuleSet implements ChecksumAware { @Override public int hashCode() { return getName().hashCode() + 13 * getRules().hashCode(); } 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 testEquals4() { RuleSet s1 = createRuleSetBuilder("my ruleset") .addRule(new MockRule("name", "desc", "msg", "rulesetname")) .build(); RuleSet s2 = createRuleSetBuilder("my ruleset") .addRule(new MockRule("name", "desc", "msg", "rulesetname")) .build(); assertEquals("2 rulesets with same name and rules must be equals", s1, s2); assertEquals("Equals rulesets must have the same hashcode", s1.hashCode(), s2.hashCode()); }