### Question:
DirectedAcyclicGraph extends SimpleDirectedGraph<V, E> implements Iterable<V> { @Override public E addEdge(V sourceVertex, V targetVertex) { assertVertexExist(sourceVertex); assertVertexExist(targetVertex); E result; try { updateDag(sourceVertex, targetVertex); result = super.addEdge(sourceVertex, targetVertex); } catch (CycleFoundException e) { throw new IllegalArgumentException(EDGE_WOULD_INDUCE_A_CYCLE); } return result; } DirectedAcyclicGraph(Class<? extends E> edgeClass);  DirectedAcyclicGraph(Class<? extends E> edgeClass, boolean weighted);  DirectedAcyclicGraph(EdgeFactory<V, E> ef);  DirectedAcyclicGraph(EdgeFactory<V, E> ef, boolean weighted); protected  DirectedAcyclicGraph(
        EdgeFactory<V, E> ef, VisitedStrategyFactory visitedStrategyFactory,
        TopoOrderMap<V> topoOrderMap, boolean weighted); static GraphBuilder<V, E, ? extends DirectedAcyclicGraph<V, E>> createBuilder(
        Class<? extends E> edgeClass); static GraphBuilder<V, E, ? extends DirectedAcyclicGraph<V, E>> createBuilder(
        EdgeFactory<V, E> ef); @Override GraphType getType(); @Override boolean addVertex(V v); @Override boolean removeVertex(V v); @Override E addEdge(V sourceVertex, V targetVertex); @Override boolean addEdge(V sourceVertex, V targetVertex, E e); Set<V> getAncestors(V vertex); Set<V> getDescendants(V vertex); Iterator<V> iterator();  }### Answer:
@Test public void testWhenVertexIsNotInGraph_Then_ThowException() { DirectedAcyclicGraph<Long, DefaultEdge> dag = new DirectedAcyclicGraph<>(DefaultEdge.class); try { dag.addEdge(1l, 2l); } catch (IllegalArgumentException e) { return; } fail("No exception 'IllegalArgumentException' catched"); }