assertEquals(0, cache.getNumberOfLocksHeld());
}
private CacheSPI<Object, Object> createCache(Configuration.CacheMode mode, IsolationLevel level)
{
Configuration c = new Configuration();
c.setCacheMode(mode);
c.setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
c.setIsolationLevel(level);
c.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
return (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(c);
}