@Test
public void search_all_rules() throws Exception {
List<Rule> rules = newArrayList(mock(Rule.class));
Result serviceResult = mock(Result.class);
when(serviceResult.scroll()).thenReturn(rules.iterator());
when(ruleService.search(any(RuleQuery.class), any(QueryContext.class))).thenReturn(serviceResult);
HashMap<String, Object> params = newHashMap();
params.put("pageSize", "-1");