priority.put(helper.addFunctionRequiringProducing(helper.getRequirement2Foo(), helper.getValue2Bar()), 5); // 2
priority.put(helper.addFunctionProducing(helper.getValue1Foo()), 1); // 3
priority.put(helper.addFunctionProducing(helper.getValue1Bar()), 1); // 4
priority.put(helper.addFunctionProducing(helper.getValue2Bar()), 1); // 5
priority.put(helper.addFunctionProducing(helper.getValue2Foo()), 1); // 6
final DependencyGraphBuilder builder = helper.createBuilder(new FunctionPriority() {
@Override
public int getPriority(final CompiledFunctionDefinition function) {
return priority.get(function);
}
});