node1.addAnnotation(AnnotationKeys.LOCATION, location1);
ProcessingElementNode node2 = new ProcessingElementNode("2");
node2.addAnnotation(AnnotationKeys.LOCATION, location1);
ProcessingElementNode node3 = new ProcessingElementNode("3");
node3.addAnnotation(AnnotationKeys.LOCATION, location2);
ResultNode result = new ResultNode("name");
result.addAnnotation(AnnotationKeys.LOCATION, location2);
node1.connectOutput("output", 0, node2.getInput("input", 0));
node2.connectOutput("output", 0, node3.getInput("input", 0));
node3.connectOutput("output", 0, result.getInput());
Graph graph = new Graph();
graph.add(node1);
graph.add(node2);
graph.add(node3);
graph.add(result);