private ConfigEntry resolveEffectiveTopicConfig(ConfigDef.ConfigKey configKey,
            Map<String, ?> staticNodeConfig,
            Map<String, ?> dynamicClusterConfigs,
            Map<String, ?> dynamicNodeConfigs,
            Map<String, ?> dynamicTopicConfigs) {
        if (dynamicTopicConfigs.containsKey(configKey.name)) {
            return toConfigEntry(configKey,
                dynamicTopicConfigs.get(configKey.name),
                ConfigSource.DYNAMIC_TOPIC_CONFIG, Function.identity());
        }
        List<ConfigSynonym> synonyms = logConfigSynonyms.getOrDefault(configKey.name, emptyList());
        for (ConfigSynonym synonym : synonyms) {
            if (dynamicNodeConfigs.containsKey(synonym.name())) {
                return toConfigEntry(configKey, dynamicNodeConfigs.get(synonym.name()),
                    ConfigSource.DYNAMIC_BROKER_CONFIG, synonym.converter());
            }
        }
        for (ConfigSynonym synonym : synonyms) {
            if (dynamicClusterConfigs.containsKey(synonym.name())) {
                return toConfigEntry(configKey, dynamicClusterConfigs.get(synonym.name()),
                    ConfigSource.DYNAMIC_DEFAULT_BROKER_CONFIG, synonym.converter());
            }
        }
        for (ConfigSynonym synonym : synonyms) {
            if (staticNodeConfig.containsKey(synonym.name())) {
                return toConfigEntry(configKey, staticNodeConfig.get(synonym.name()),
                    ConfigSource.STATIC_BROKER_CONFIG, synonym.converter());
            }
        }
        return toConfigEntry(configKey, configKey.hasDefault() ? configKey.defaultValue : null,
            ConfigSource.DEFAULT_CONFIG, Function.identity());
    }
@Test
    public void testResolveEffectiveTopicConfig() {
        Map<String, String> staticNodeConfig = new HashMap<>();
        staticNodeConfig.put("foo.bar", "the,static,value");
        staticNodeConfig.put("quux", "123");
        staticNodeConfig.put("ghi", "false");
        Map<String, String> dynamicClusterConfigs = new HashMap<>();
        dynamicClusterConfigs.put("foo.bar", "the,dynamic,cluster,config,value");
        dynamicClusterConfigs.put("quux", "456");
        Map<String, String> dynamicNodeConfigs = new HashMap<>();
        dynamicNodeConfigs.put("quux", "789");
        Map<String, String> dynamicTopicConfigs = new HashMap<>();
        dynamicTopicConfigs.put("ghi", "true");
        Map<String, ConfigEntry> expected = new HashMap<>();
        expected.put("abc", new ConfigEntry("abc", "the,dynamic,cluster,config,value",
            ConfigEntry.ConfigSource.DYNAMIC_DEFAULT_BROKER_CONFIG, false, false, emptyList(),
                ConfigEntry.ConfigType.LIST, "abc doc"));
        expected.put("def", new ConfigEntry("def", "2840400000",
            ConfigEntry.ConfigSource.DYNAMIC_BROKER_CONFIG, false, false, emptyList(),
            ConfigEntry.ConfigType.LONG, "def doc"));
        expected.put("ghi", new ConfigEntry("ghi", "true",
            ConfigEntry.ConfigSource.DYNAMIC_TOPIC_CONFIG, false, false, emptyList(),
            ConfigEntry.ConfigType.BOOLEAN, "ghi doc"));
        expected.put("xyz", new ConfigEntry("xyz", "thedefault",
            ConfigEntry.ConfigSource.DEFAULT_CONFIG, true, false, emptyList(),
            ConfigEntry.ConfigType.PASSWORD, "xyz doc"));
        assertEquals(expected, SCHEMA.resolveEffectiveTopicConfigs(staticNodeConfig,
            dynamicClusterConfigs,
            dynamicNodeConfigs,
            dynamicTopicConfigs));
    }