### Question:
MultiGraph implements Graph { public Iterable<Vertex> getVertices() { Collection<Iterable<Vertex>> base = new LinkedList<Iterable<Vertex>>(); for (int pos = 0; pos < bases.length; pos++) { base.add(new MultiVertexIterable(pos)); } return new MultiIterable<Vertex>(base); } MultiGraph(final Graph... bases); Vertex addVertex(Object id); Vertex getVertex(Object id); void removeVertex(Vertex vertex); Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label); Edge getEdge(Object id); void removeEdge(Edge edge); Iterable<Vertex> getVertices(); Iterable<Edge> getEdges(); void clear(); void shutdown();  }### Answer:
@Test public void testVertices() throws Exception { int count = 0; Set<Object> ids = new HashSet<Object>(); for (Vertex v : graph.getVertices()) { assertTrue(v instanceof MultiVertex); ids.add(v.getId()); count++; } assertEquals(5, count); assertEquals(5, ids.size()); assertTrue(ids.contains("Ford")); assertTrue(ids.contains("Arthur")); assertTrue(ids.contains("Zaphod")); assertTrue(ids.contains("Earth")); assertTrue(ids.contains("Betelgeuse")); }