}
private static void checkBuildGraph(Model model, GraphListener listen, Object state0, Object state2) {
InspectableGraph graph = listen.getGraph();
// now check that the correct graph has been built.
assertEquals(3, graph.numVertices());
assertEquals(5, graph.numEdges());
Vertex s0 = listen.getVertex("0");
Vertex s1 = listen.getVertex("1");
Vertex s2 = listen.getVertex("2");