);
RuleKey ruleKey = RuleKey.of("squid", "AvoidCycle");
ActiveRule activeRule = mock(ActiveRule.class);
when(activeRule.key()).thenReturn(ActiveRuleKey.of("abcd", ruleKey));
when(activeRule.severity()).thenReturn(Severity.MINOR);
when(activeRule.params()).thenReturn(ImmutableMap.of("max", "2"));
when(qProfileLoader.findActiveRulesByProfile("abcd")).thenReturn(newArrayList(activeRule));
Rule rule = mock(Rule.class);
when(rule.name()).thenReturn("Avoid Cycle");