public static DummyTransaction beginAndSuspendTx(Cache cache, Object key) {
DummyTransactionManager dummyTm = (DummyTransactionManager) TestingUtil.getTransactionManager(cache);
try {
dummyTm.begin();
cache.put(key, "v");
return (DummyTransaction) dummyTm.suspend();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}