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");
when(rule.internalKey()).thenReturn("squid-1");
when(ruleService.getNonNullByKey(ruleKey)).thenReturn(rule);
WsTester.TestRequest request = tester.newGetRequest("batch", "project").setParam("key", projectKey);
request.execute().assertJson(getClass(), "return_active_rules.json");
}