public static <T extends NamedConfig> T getConfig(ConfigPatternMatcher configPatternMatcher,
                                                      Map<String, T> configs, String name,
                                                      Class clazz) {
        return getConfig(configPatternMatcher, configs, name, clazz, (BiConsumer<T, String>) DEFAULT_NAME_SETTER);
    }
@Test
    public void getConfigWithDefaultNameMatcher() {
        QueueConfig aDefault = new QueueConfig("newConfig");
        aDefault.setBackupCount(5);
        queueConfigs.put(aDefault.getName(), aDefault);
        QueueConfig newConfig = ConfigUtils.getConfig(configPatternMatcher, queueConfigs, "newConfig@partition1", QueueConfig.class);

        assertEquals("newConfig", newConfig.getName());
        assertEquals(5, newConfig.getBackupCount());
        assertEquals(1, queueConfigs.size());
        assertTrue(queueConfigs.containsKey("newConfig"));
    }