code: public <K, V> void replaceCacheConfiguration(final String alias, final CacheConfiguration<K, V> config, final CacheRuntimeConfiguration<K, V> runtimeConfiguration) {
      if (!caches.replace(alias, config, runtimeConfiguration)) {
        throw new IllegalStateException("The expected configuration doesn't match!");
      }
    }
docs: Replaces a {@link CacheConfiguration} with a {@link CacheRuntimeConfiguration} for the provided alias.
  
  @param alias the alias of the cache
  @param config the existing configuration
  @param runtimeConfiguration the new configuration
  @param <K> the key type
  @param <V> the value type
  
  @throws IllegalStateException if the replace fails