}
String DB = ConfigTest.getCleanDir() ;
{
// Create new DB (assuming it's empty now)
Graph graph = TDBFactory.createDatasetGraph(DB).getDefaultGraph() ;
PrefixMapping pm = graph.getPrefixMapping();
pm.setNsPrefix("test", "http://test");
graph.close();
}
{
// Reconnect to the same DB
Graph graph = TDBFactory.createDatasetGraph(DB).getDefaultGraph() ;
PrefixMapping pm = graph.getPrefixMapping();
Map<String, String> map = pm.getNsPrefixMap();
assertEquals(1, map.size()) ;
//System.out.println("Size: " + map.size());
String ns = pm.getNsPrefixURI("test");
//System.out.println("Namespace: " + ns);
assertEquals("http://test", ns) ;
graph.close();
}
FileOps.deleteSilent(DB);