Added tests for DirectedAcyclicGraph
Made DirectedAcyclicGraph comply with tests