EVCacheManager extends AbstractCacheManager { @Override protected Collection<? extends Cache> loadCaches() { return configurations.stream() .map(this::create) .collect(Collectors.toList()); } EVCacheManager(final EVCacheClientPoolManager evcacheClientPoolManager,
                          final Set<EVCacheConfiguration> configurations,
                          final List<Builder.Customizer> customizers); void setAllowNullValues(final boolean allowNullValues); void setDeleteWhitespaceKey(final boolean deleteWhitespaceKey); void setTranscoder(final Transcoder<? extends Object> transcoder);  }
@Test void loadCaches() { final EVCacheConfiguration configuration1 = new EVCacheConfiguration("1", 1, "TEST", "test1", Duration.ofSeconds(1000), true, true); final EVCacheConfiguration configuration2 = new EVCacheConfiguration("2", 2, "TEST", "test2", Duration.ofSeconds(90), false, false); final Set<EVCacheConfiguration> configurations = new HashSet<>(); configurations.add(configuration1); configurations.add(configuration2); final EVCache.Builder.Customizer customizer = mock(EVCache.Builder.Customizer.class); final EVCacheConfig config = new EVCacheConfig(DefaultPropertyFactory.from(EmptyConfig.INSTANCE)); final EVCacheClientPoolManager evcacheClientPoolManager = new EVCacheClientPoolManager(new ConnectionFactoryBuilder(), new SimpleNodeListProvider(), config); final EVCacheManager manager = new EVCacheManager(evcacheClientPoolManager, configurations, singletonList(customizer)); final List<? extends Cache> caches = new ArrayList<>(manager.loadCaches()); assertThatCache(getNativeCache(caches, 0), configuration1); assertThatCache(getNativeCache(caches, 1), configuration2); verify(customizer, times(2)).customize(eq("TEST"), any()); }