@Override
	public DefaultVisualGraph<AbstractTestVertex, TestEdge> copy() {

		TestVisualGraph newGraph = new TestVisualGraph();

		Collection<AbstractTestVertex> myVertices = getVertices();
		for (AbstractTestVertex v : myVertices) {
			newGraph.addVertex(v);
		}

		Collection<TestEdge> myEdges = getEdges();
		for (TestEdge e : myEdges) {
			newGraph.addEdge(e);
		}

		newGraph.setLayout(layout);

		return newGraph;
	}
A visual graph implementation used for testing.
Ghidra/Framework/Graph/src/test/java/ghidra/graph/support/TestVisualGraph.java