public void checkWithVertex(Vertex v,String expectedExceptionString, String testName)
{
LearnerGraph graph = buildLearnerGraph("A--a-->B<-b-CNFL\nA-b->A-c->A\nB-d->B-p->CNFL",testName,config,converter);
final DirectedSparseGraph g = graph.pathroutines.getGraph();
new LearnerGraph(g,config);// without the vertex being added, everything should be fine.
g.addVertex(v);// add the vertex
checkForCorrectException(new whatToRun() { public @Override void run() {
new LearnerGraph(g,config);// now getGraphData should choke.
}},IllegalArgumentException.class,expectedExceptionString);
}