public boolean isNamespaceReferencedWithHotRestart(@Nonnull String namespace)  {
        return nodeEngine.getConfig()
                .getCacheConfigs()
                .values()
                .stream()
                .filter(cacheConfig -> cacheConfig.getDataPersistenceConfig().isEnabled())
                .map(CacheSimpleConfig::getUserCodeNamespace)
                .anyMatch(namespace::equals)
                || getCacheConfigs()
                .stream()
                .filter(cacheConfig -> cacheConfig.getHotRestartConfig().isEnabled())
                .map(CacheConfig::getUserCodeNamespace)
                .anyMatch(namespace::equals);
    }
@Test
    public void testIsNamespaceReferencedWithHotRestart_withNoCacheConfigs_false() {
        CacheService cacheService = new TestCacheService(mockNodeEngine, true);
        when(mockConfig.getCacheConfigs()).thenReturn(Map.of());
        assertFalse(cacheService.isNamespaceReferencedWithHotRestart("ns1"));
    }