@Override protected void createCacheManagers() throws Throwable { ControlledConsistentHashFactory chf = new ControlledConsistentHashFactory.Default(0, 1); ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(true); builder .clustering() .cacheMode(CacheMode.REPL_SYNC) .hash() .numSegments(1) .consistentHashFactory(chf) .expiration() .lifespan(10, TimeUnit.SECONDS) .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .lockingMode(LockingMode.OPTIMISTIC) .locking() .isolationLevel(IsolationLevel.REPEATABLE_READ) .writeSkewCheck(true) .versioning() .enable() .scheme(VersioningScheme.SIMPLE); createCluster(builder, 2); TestingUtil.replaceComponent(manager(0), TimeService.class, timeService, true); expirationManager1 = cache(0).getAdvancedCache().getExpirationManager(); TestingUtil.replaceComponent(manager(1), TimeService.class, timeService, true); expirationManager2 = cache(1).getAdvancedCache().getExpirationManager(); }