cost3.addCostSource(new CyclomaticCost(new SourceLocation(null, 0), Cost.cyclomatic(1)));
cost3.addCostSource(new CyclomaticCost(new SourceLocation(null, 0), Cost.cyclomatic(1)));
cost3.addCostSource(new CyclomaticCost(new SourceLocation(null, 0), Cost.cyclomatic(1)));
cost.addCostSource(new MethodInvocationCost(new SourceLocation(null, 0), cost3,
IMPLICIT_STATIC_INIT, Cost.cyclomatic(3)));
CostModel costModel = new CostModel(2, 10, 1);
cost.link();
assertEquals((long) 2 * (3 + 1) + 10 * 1, costModel.computeOverall(cost.getTotalCost()));
assertEquals(2, cost.getExplicitViolationCosts().size());
assertEquals(1, cost.getImplicitViolationCosts().size());
}