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")));
SonarAnalysisResult result = sonarResultEvaluator.getResult(context, ADDRESS);
assertEquals(SonarAnalysisStatus.ERRORS, result.getStatus());
assertEquals("Sonar analysis (" + ADDRESS + "):\n Warnings:\n Coverage<80\n Errors:\n Complexity>20",
result.getMessage());
}