### Question:
YasglHelper implements StartsConstants { public static void addEdgeToGraph(DirectedGraphBuilder<String> builder, String str) { String[] edge = str.split(WHITE_SPACE); if (edge.length != 2) { throw new IllegalArgumentException("@@@NoEdgeTarget: " + str); } internAndAddEdge(builder, edge); }  static Set<String> computeReachabilityFromChangedClasses(Set<String> changed, DirectedGraph<String> graph); static Set<String> reverseReachabilityFromChangedClasses(Set<String> changed, DirectedGraph<String> graph); static void readZipToBuilder(File graphFile, DirectedGraphBuilder<String> builder); static void addEdgeToGraph(DirectedGraphBuilder<String> builder, String str); static void internAndAddEdge(DirectedGraphBuilder<String> builder, String[] edge); @SuppressWarnings("checkstyle:Regexp") DirectedGraphBuilder<String> addEdgesToBuilder(File graphFile, DirectedGraphBuilder<String> builder);  }### Answer:
@Test(expected = Exception.class) public void addEmptyEdgeTest() throws Exception { yasgl.addEdgeToGraph(builder, ""); }
@Test public void addEdgeToGraphTest() throws Exception { String[] edgesToAdd = {"1 2"}; edges = addEdgeToGraph(edgesToAdd); edge = new Edge<String>("1", "2"); assertTrue(edges.contains(edge)); }
@Test public void addMultipleEdgesToGraph() throws Exception { String [] edgesToAdd = {"x y", "u v"}; edges = addEdgeToGraph(edgesToAdd); edge = new Edge<String>("x", "y"); assertTrue(edges.contains(edge)); edge = new Edge<String>("u", "v"); assertTrue(edges.contains(edge)); }