@Test
    public void neighbourListDoesNotCauseEndlessLoops() {
        l.addVertex(v);
        Vertex[] add = new Vertex[10];
        for (int i = 1; i < 10; i++) {
            add[i] = new Vertex(i);
            l.addVertex(add[i]);
        }
        for (int i = 1; i < 6; i++) {
            l.addEdge(v, add[i]);
        }
        DoublyLinkedList<Vertex> neighbours = l.getNeighbours(0);
        int i = 0;
        Vertex t = neighbours.min();
        while (t != null) {
            t = neighbours.succ(t);
            i++;
            if (i > 40) {
                break;
            }
        }
        assertTrue("Neighbour list causes an endless loop!", i < 40);
    }