model.buildGraph();
InspectableGraph graph = model.getGraph();
// now check that the correct graph has been built.
Assert.assertEquals(3, graph.numVertices());
Assert.assertEquals(5, graph.numEdges());
Vertex s0 = model.getVertex("0");
Vertex s1 = model.getVertex("1");
Vertex s2 = model.getVertex("2");
Assert.assertNotNull(s0);
Assert.assertNotNull(s1);
Assert.assertNotNull(s2);
Assert.assertEquals("0", s0.element());
Assert.assertEquals("1", s1.element());
Assert.assertEquals("2", s2.element());
// we must iterate through the edges, because graph.aConnectingEdge
// does not respect the direction of the edge!
EdgeIterator iter = graph.edges();
while (iter.hasNext()) {
Edge e = iter.nextEdge();