/** Checks if adding a vertex to a graph causes an exception to be thrown. */
public void checkWithVertex(Vertex v,String expectedExceptionString, String testName)
{
final DirectedSparseGraph g = buildGraph("A--a-->B<-b-CONFL\nA-b->A-c->A\nB-d->B-p->CONFL",testName);
new LearnerGraph(g,config);// without the vertex being added, everything should be fine.
g.addVertex(v);// add the vertex
checkForCorrectException(new whatToRun() { public void run() {
new LearnerGraph(g,config);// now getGraphData should choke.
}},IllegalArgumentException.class,expectedExceptionString);
}