@SuppressWarnings("unchecked")
    public static synchronized <T extends Cache> T createSerializingCache(String name, Class keyClass, Class valueClass) {
        T cache = (T) caches.get(name);
        if (cache != null) {
            return cache;
        }

        final Cache<String, String> delegate = (Cache<String, String>) cacheFactoryStrategy.createCache(name);
        final T sCache = (T) new SerializingCache(delegate, keyClass, valueClass);

        log.info("Created serializing cache [" + cacheFactoryStrategy.getClass().getName() + "] for " + name);

        return wrapCache(sCache, name);
    }
@Test
    public void testSerializingCacheCreation() throws Exception
    {
        // Setup test fixture.

        // Execute system under test.
        final Cache result = CacheFactory.createSerializingCache("unittest-serializingcache-creation", String.class, String.class);

        // Verify results.
        assertNotNull(result);
        assertInstanceOf(SerializingCache.class, ((CacheWrapper) result).getWrappedCache());
    }