code: private JobSpec convertHopToJobSpec (ServiceNode sourceNode, ServiceNode targetNode, FlowSpec flowSpec) {
      FlowEdge flowEdge = weightedGraph.getAllEdges(sourceNode, targetNode).iterator().next();
      URI templateURI = getTemplateURI (sourceNode, targetNode, flowSpec, flowEdge);
      return buildJobSpec(sourceNode, targetNode, templateURI, flowSpec);
    }
docs: A naive implementation of resolving templates in each JobSpec among Multi-hop FlowSpec.
  Handle the case when edge is not specified.
  Always select the first available template.