public void testTransactionCommitThenAbort()
{
Graph initial = graphWith( "A pings B; B pings C" );
Graph extra = graphWith( "C pingedBy B; fileGraph rdf:type Graph" );
File foo = FileUtils.tempFileName( "fileGraph", ".nt" );
Graph g = new FileGraph( foo, true, true );
g.getTransactionHandler().begin();
GraphUtil.addInto( g, initial );
g.getTransactionHandler().commit();
g.getTransactionHandler().begin();
GraphUtil.addInto( g, extra );
g.getTransactionHandler().abort();
assertIsomorphic( initial, g );
Model inFile = ModelFactory.createDefaultModel();
inFile.read( "file:///" + foo, "N-TRIPLES" );
assertIsomorphic( initial, inFile.getGraph() );
}