when(context.getResource()).thenReturn(file);
when(context.getMeasure(CoreMetrics.NCLOC)).thenReturn(new Measure(CoreMetrics.NCLOC, 10.0));
when(context.getMeasure(CoreMetrics.TECHNICAL_DEBT)).thenReturn(new Measure(CoreMetrics.TECHNICAL_DEBT, 300.0 * ONE_DAY_IN_MINUTES));
decorator.decorate(file, context);
verify(context).saveMeasure(argThat(new IsMeasure(CoreMetrics.SQALE_RATING, 3.0)));
verify(context).saveMeasure(argThat(new IsMeasure(CoreMetrics.DEVELOPMENT_COST, "9600")));
verify(context).saveMeasure(CoreMetrics.SQALE_DEBT_RATIO, 1500d);
verify(context).getMeasure(CoreMetrics.NCLOC);
}