public class MethodCostTest extends TestCase {
public void testComputeOverallCost() throws Exception {
MethodCost cost = new MethodCost("", "a", 0, false, false, false);
cost.addCostSource(new CyclomaticCost(new SourceLocation(null, 0), Cost.cyclomatic(1)));
cost.addCostSource(new GlobalCost(new SourceLocation(null, 0), null, Cost.global(1)));
MethodCost cost3 = new MethodCost("", "b", 0, false, false, false);
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();