new Object[] {VIOLATIONS_ID, null, null, rule1.getId(), 100.0},// rule 1
new Object[] {VIOLATIONS_ID, null, null, rule2.getId(), 80.0})); // rule 2
// current analysis
DecoratorContext context = mock(DecoratorContext.class);
Measure violations = newMeasure(VIOLATIONS, 200.0);
Measure violationsRule1 = RuleMeasure.createForRule(VIOLATIONS, rule1, 130.0);
Measure violationsRule2 = RuleMeasure.createForRule(VIOLATIONS, rule2, 70.0);
when(context.getMeasures(Matchers.<MeasuresFilter>anyObject())).thenReturn(Arrays.asList(violations, violationsRule1, violationsRule2));
VariationDecorator decorator = new VariationDecorator(pastMeasuresLoader, mock(MetricFinder.class), Arrays.asList(pastSnapshot1), ruleFinder);
decorator.decorate(dir, context);