@Test
public void add_technical_debt_only_from_children_measures() throws Exception {
when(issuable.issues()).thenReturn(Collections.<Issue>emptyList());
when(context.getChildrenMeasures(any(MeasuresFilter.class))).thenReturn(Lists.<Measure>newArrayList(
new RuleMeasure(CoreMetrics.TECHNICAL_DEBT,
org.sonar.api.rules.Rule.create(ruleKey1.repository(), ruleKey1.rule())
, null, null).setValue(5d * ONE_DAY_IN_MINUTES),
new RuleMeasure(CoreMetrics.TECHNICAL_DEBT,
org.sonar.api.rules.Rule.create(ruleKey2.repository(), ruleKey2.rule())
, null, null).setValue(10d * ONE_DAY_IN_MINUTES)
));
decorator.decorate(resource, context);