@Override
    public void appendEdge(E edge) {
        checkNotNull(edge, "Edge cannot be null");
        checkArgument(edges.isEmpty() || dst().equals(edge.src()),
                      "Edge source must be the same as the current path destination");
        edges.add(edge);
    }
@Test
    public void appendEdge() {
        MutablePath<TestVertex, TestEdge> p = new DefaultMutablePath<>();
        p.appendEdge(new TestEdge(A, B));
        p.appendEdge(new TestEdge(B, C));
        validatePath(p, A, C, 2);
    }