@Override
    public void loadConfiguration(NacosLoggingProperties loggingProperties) {
        String location = loggingProperties.getLocation();
        configurator.setLoggingProperties(loggingProperties);
        LoggerContext loggerContext = loadConfigurationOnStart(location);
        if (hasNoListener(loggerContext)) {
            addListener(loggerContext, location);
        }
    }
@Test
    void testLoadConfigurationSuccess() {
        LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
        loggerContext.putObject(CoreConstants.RECONFIGURE_ON_CHANGE_TASK, new ReconfigureOnChangeTask());
        logbackNacosLoggingAdapter.loadConfiguration(loggingProperties);
        for (Logger each : loggerContext.getLoggerList()) {
            if (!"com.alibaba.nacos.client.naming".equals(each.getName())) {
                continue;
            }
            assertNotNull(each.getAppender("ASYNC-NAMING"));
        }
        boolean containListener = false;
        LoggerContextListener listener = null;
        for (LoggerContextListener each : loggerContext.getCopyOfListenerList()) {
            if (each instanceof LogbackNacosLoggingAdapter.NacosLoggerContextListener) {
                containListener = true;
                listener = each;
                break;
            }
        }
        assertTrue(containListener);
        // reload duplicate, without exception, listener not add again
        logbackNacosLoggingAdapter.loadConfiguration(loggingProperties);
        containListener = false;
        for (LoggerContextListener each : loggerContext.getCopyOfListenerList()) {
            if (each instanceof LogbackNacosLoggingAdapter.NacosLoggerContextListener) {
                assertEquals(listener, each);
                containListener = true;
            }
        }
        assertTrue(containListener);
    }