TDBMaker.reset() ;
DatasetGraphMakerTDB f = TDBMaker.getImplFactory() ;
DatasetGraphTDB dg0 = TDBMaker._createDatasetGraph(Location.mem()) ;
// Uncached.
TDBMaker.setImplFactory(TDBMaker.uncachedFactory) ;
DatasetGraphTDB dg1 = TDBMaker._createDatasetGraph(Location.mem()) ;
DatasetGraphTDB dg2 = TDBMaker._createDatasetGraph(Location.mem()) ;
assertNotSame(dg1, dg2) ;
// Switch back to cached.
TDBMaker.setImplFactory(f) ;
DatasetGraphTDB dg3 = TDBMaker._createDatasetGraph(Location.mem()) ;
assertNotSame(dg3, dg1) ;
assertNotSame(dg3, dg2) ;
assertSame(dg3, dg0) ;
}