### Question:
AttributedGraph extends AbstractBaseGraph<AttributedVertex, AttributedEdge> { public AttributedEdge addEdge(AttributedVertex source, AttributedVertex target, String edgeId) { AttributedEdge basicEdge = new AttributedEdge(edgeId); addEdge(source, target, basicEdge); return basicEdge; } AttributedGraph();  AttributedGraph(boolean collapseDuplicateEdges); AttributedVertex addVertex(String id); AttributedVertex addVertex(String id, String name); @Override AttributedVertex addVertex(); @Override boolean addVertex(AttributedVertex vertex); AttributedEdge addEdge(AttributedVertex source, AttributedVertex target, String edgeId); @Override boolean addEdge(AttributedVertex source, AttributedVertex target, AttributedEdge edge); @Override AttributedEdge addEdge(AttributedVertex source, AttributedVertex target); int getEdgeCount(); int getVertexCount(); AttributedVertex getVertex(String vertexId);  }### Answer:
@Test public void testAddEdge() { AttributedVertex v1 = graph.addVertex("A", "Bob"); AttributedVertex v2 = graph.addVertex("B", "Joe"); AttributedEdge e = graph.addEdge(v1, v2); assertEquals(1, graph.getEdgeCount()); assertEquals(v1, graph.getEdgeSource(e)); assertEquals(v2, graph.getEdgeTarget(e)); }