when(context.getMeasures((MeasuresFilter) anyObject())).thenReturn(
Arrays.<Measure> asList(newMeasure(CoreMetrics.LINES, Metric.Level.OK, "Message1"),
newMeasure(CoreMetrics.COVERAGE, Metric.Level.WARN, "Coverage<80"),
newMeasure(CoreMetrics.CLASS_COMPLEXITY, Metric.Level.ERROR, "Complexity>20")));
Rule rule = mock(Rule.class);
RuleKey ruleKey = RuleKey.parse("1:2");
when(ruleFinder.findByKey(ruleKey)).thenReturn(rule);
when(rule.getSeverity()).thenReturn(RulePriority.BLOCKER);
Issue issue = mock(Issue.class);
when(issue.isNew()).thenReturn(true);
when(issue.ruleKey()).thenReturn(ruleKey);
when(issue.message()).thenReturn("issue message");