// force a tear down if the test runner didn't run one before (happens in IDEA)
if (cache1 != null || cache2 != null)
tearDown();
CacheFactory<String, String> instance = new DefaultCacheFactory();
cache1 = (CacheSPI<String, String>) instance.createCache(false);
cache1.getConfiguration().setClusterName("test");
cache1.getConfiguration().setStateRetrievalTimeout(1000);
cache1.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache1.getConfiguration().setNodeLockingScheme(nodeLockingScheme);
cache1.getConfiguration().setCacheMode(cacheMode);