@Override
    public <K, V> StroomCache<K, V> getCache(final String name) {
        try {
            return (StroomCache<K, V>) caches.get(name);
        } catch (ClassCastException e) {
            throw new RuntimeException(LogUtil.message("Cache {} is not of the expected type: {}", e.getMessage(), e));
        }
    }
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