public Map<String, String> mergeLocalParams(Map<String, String> localMap) {
        String ump = localMap.get(URL_MERGE_PROCESSOR_KEY);
        ProviderURLMergeProcessor providerUrlMergeProcessor;

        if (StringUtils.isNotEmpty(ump)) {
            providerUrlMergeProcessor = applicationModel
                    .getExtensionLoader(ProviderURLMergeProcessor.class)
                    .getExtension(ump);
        } else {
            providerUrlMergeProcessor = applicationModel
                    .getExtensionLoader(ProviderURLMergeProcessor.class)
                    .getExtension("default");
        }

        return providerUrlMergeProcessor.mergeLocalParams(localMap);
    }
@Test
    void testMergeLocalParams() {

        // Verify default ProviderURLMergeProcessor
        URL consumerURL = new URLBuilder(DUBBO_PROTOCOL, "localhost", 55555)
                .addParameter(PID_KEY, "1234")
                .addParameter(THREADPOOL_KEY, "foo")
                .addParameter(APPLICATION_KEY, "consumer")
                .addParameter(REFERENCE_FILTER_KEY, "filter3")
                .addParameter(TAG_KEY, "UUU")
                .build();

        Map<String, String> params = clusterUtils.mergeLocalParams(consumerURL.getParameters());

        Assertions.assertEquals("1234", params.get(PID_KEY));
        Assertions.assertEquals("foo", params.get(THREADPOOL_KEY));
        Assertions.assertEquals("consumer", params.get(APPLICATION_KEY));
        Assertions.assertEquals("filter3", params.get(REFERENCE_FILTER_KEY));
        Assertions.assertEquals("UUU", params.get(TAG_KEY));

        // Verify custom ProviderURLMergeProcessor
        URL consumerUrlForTag = new URLBuilder(DUBBO_PROTOCOL, "localhost", 55555)
                .addParameter(PID_KEY, "1234")
                .addParameter(THREADPOOL_KEY, "foo")
                .addParameter(APPLICATION_KEY, "consumer")
                .addParameter(REFERENCE_FILTER_KEY, "filter3")
                .addParameter(TAG_KEY, "UUU")
                .addParameter(URL_MERGE_PROCESSOR_KEY, "tag")
                .build();

        Map<String, String> paramsForTag = clusterUtils.mergeLocalParams(consumerUrlForTag.getParameters());

        Assertions.assertEquals("1234", paramsForTag.get(PID_KEY));
        Assertions.assertEquals("foo", paramsForTag.get(THREADPOOL_KEY));
        Assertions.assertEquals("consumer", paramsForTag.get(APPLICATION_KEY));
        Assertions.assertEquals("filter3", paramsForTag.get(REFERENCE_FILTER_KEY));
        Assertions.assertNull(paramsForTag.get(TAG_KEY));
    }