public DataCache<List<MavenArtifact>> getCentralCache() {
        try {
            final ICompositeCacheAttributes attr = new CompositeCacheAttributes();
            attr.setUseDisk(true);
            attr.setUseLateral(false);
            attr.setUseRemote(false);
            final CacheAccess<String, List<MavenArtifact>> ca = JCS.getInstance("CENTRAL", attr);
            final DataCache<List<MavenArtifact>> dc = new DataCache<>(ca);
            return dc;
        } catch (Throwable ex) {
            //some reports of class not found exception, log and disable the cache.
            if (ex instanceof CacheException) {
                throw ex;
            }
            //TODO we may want to instrument w/ jdiagnostics per #2509
            LOGGER.debug("Error constructing cache for Central files", ex);
            throw new CacheException(ex);
        }
    }
@Test
    public void testGetCache() throws IOException {
        DataCacheFactory instance = new DataCacheFactory(getSettings());
        DataCache<List<MavenArtifact>> result = instance.getCentralCache();
        assertNotNull(result);

        File f = new File(getSettings().getDataDirectory(), "cache");
        assertTrue(f.isDirectory());

        FilenameFilter filter = (File f1, String name) -> name.startsWith("CENTRAL");
        assertTrue(f.listFiles(filter).length > 0);
    }