public void testNoLocalTransaction() throws Exception
{
TestListener listener = new TestListener();
CacheSPI<Object, Object> cache = createCacheWithListener(listener);
LockManager lockManager = TestingUtil.extractLockManager(cache);
TransactionManager mgr = cache.getConfiguration().getRuntimeConfig().getTransactionManager();
assertNull(mgr.getTransaction());
assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());
SamplePojo pojo = new SamplePojo(21, "test");
cache.put("/one/two", "key1", pojo);
assertNull(mgr.getTransaction());
assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());
assertTrue(cache.exists(Fqn.fromString("/one/two")));
assertNotNull(cache.getRoot().getChild("one"));
assertEquals(false, lockManager.isLocked(cache.getRoot()));
assertEquals(false, lockManager.isLocked(cache.getNode("/one")));
assertEquals(false, lockManager.isLocked(cache.getNode("/one/two")));
assertNotNull(cache.getNode("/one").getChild("two"));
assertNotNull(cache.get(Fqn.fromString("/one/two"), "key1"));
assertEquals(2, listener.getNodesAdded());