@Test
    public void testDigraph3SingleLengthAncestor() {
        // digraph3 is not a DAG
        In in = new In("src\\tests\\data\\digraph3.txt");
        SAP sap = new SAP(new Digraph(in));
        assertTrue(sap.length(2, 5) == 3 && sap.ancestor(2, 5) == 2);
        assertTrue(sap.length(1, 5) == 2 && sap.ancestor(1, 5) == 1);
        assertTrue(sap.length(2, 5) == sap.length(5, 2));
        assertTrue(sap.length(1, 5) == sap.length(5, 1));
    }