public void registerCache(final String name, final StroomCache<?, ?> cache) {
        if (exists(name)) {
            throw new CacheExistsException(name);
        }

        final StroomCache<?, ?> existing = caches.put(name, cache);
        if (existing != null) {
            cache.clear();
        }
    }
This is only for tests to save providing a {@link Metrics} instance
stroom-cache/stroom-cache-impl/src/main/java/stroom/cache/impl/CacheManagerImpl.java