public synchronized Cache<K, V> getCache() throws Exception {
        if (cache == null) {
            JCacheProvider provider = JCacheProviders.lookup(configuration.getCachingProvider());
            cache = doGetCache(provider);
        }

        return cache;
    }
@Test
    public void testCacheCreationFailure() {
        JCacheConfiguration conf = new JCacheConfiguration();
        conf.setCacheName(randomString());
        conf.setCreateCacheIfNotExists(false);

        final JCacheManager<Object, Object> objectObjectJCacheManager = new JCacheManager<>(conf);

        assertThrows(IllegalStateException.class,
                () -> {
                    objectObjectJCacheManager.getCache();
                });
    }