@Override
    public boolean nextConfig(long timeout) {
        file.validateFile();
        if (checkReloaded()) {
            log.log(FINE, () -> "User forced config reload at " + System.currentTimeMillis());
            // User forced reload
            setConfigIfChanged(updateConfig());
            ConfigState<T> configState = getConfigState();
            log.log(FINE, () -> "Config updated at " + System.currentTimeMillis() + ", changed: " + configState.isConfigChanged());
            log.log(FINE, () -> "Config: " + configState.getConfig().toString());
            return true;
        }
        if (file.getLastModified() != ts) {
            setConfigIncGen(updateConfig());
            return true;
        }
        try {
            Thread.sleep(timeout);
        } catch (InterruptedException e) {
            throw new ConfigInterruptedException(e);
        }

        return false;
    }
@Test
    public void require_that_dir_config_id_reference_is_not_changed() {
        final String cfgDir = "src/test/resources/configs/foo";
        final String cfgId = "dir:" + cfgDir;
        final ConfigKey<TestReferenceConfig> key = new ConfigKey<>(TestReferenceConfig.class, cfgId);
        ConfigSubscription<TestReferenceConfig> sub = ConfigSubscription.get(key,
                                                                             new JrtConfigRequesters(),
                                                                             new DirSource(new File(cfgDir)),
                                                                             new TimingValues());
        assertTrue(sub.nextConfig(1000));
        assertEquals(cfgId, sub.getConfigState().getConfig().configId());
    }