private boolean isConformRules(String serviceName) {
        return serviceName.split(NAME_SEPARATOR, -1).length == 4;
    }
@Test
    void testIsConformRules() {
        NamingService namingService = mock(NacosNamingService.class);
        URL serviceUrlWithoutCategory = URL.valueOf("nacos://127.0.0.1:3333/" + serviceInterface + "?interface="
                + serviceInterface + "&notify=false&methods=test1,test2&version=1.0.0&group=default");
        try {
            String serviceName = "providers:org.apache.dubbo.registry.nacos.NacosService:1.0.0:default";
            String category = this.serviceUrl.getParameter(CATEGORY_KEY, DEFAULT_CATEGORY);
            URL newUrl = this.serviceUrl.addParameter(CATEGORY_KEY, category);
            newUrl = newUrl.addParameter(PROTOCOL_KEY, this.serviceUrl.getProtocol());
            newUrl = newUrl.addParameter(PATH_KEY, this.serviceUrl.getPath());
            String ip = newUrl.getHost();
            int port = newUrl.getPort();
            Instance instance = new Instance();
            instance.setIp(ip);
            instance.setPort(port);
            instance.setMetadata(new HashMap<>(newUrl.getParameters()));

            List<Instance> instances = new ArrayList<>();
            instances.add(instance);
            when(namingService.getAllInstances(
                            serviceName, this.registryUrl.getParameter(GROUP_KEY, Constants.DEFAULT_GROUP)))
                    .thenReturn(instances);

            String serviceNameWithoutVersion = "providers:org.apache.dubbo.registry.nacos.NacosService:default";
            String serviceName1 = "providers:org.apache.dubbo.registry.nacos.NacosService:1.0.0:default";
            List<String> serviceNames = new ArrayList<>();
            serviceNames.add(serviceNameWithoutVersion);
            serviceNames.add(serviceName1);
            ListView<String> result = new ListView<>();
            result.setData(serviceNames);
            when(namingService.getServicesOfServer(
                            1, Integer.MAX_VALUE, registryUrl.getParameter(GROUP_KEY, Constants.DEFAULT_GROUP)))
                    .thenReturn(result);
        } catch (NacosException e) {
            // ignore
        }

        NacosNamingServiceWrapper nacosNamingServiceWrapper =
                new NacosNamingServiceWrapper(new NacosConnectionManager(namingService), 0, 0);
        nacosRegistry = new NacosRegistry(this.registryUrl, nacosNamingServiceWrapper);

        Set<URL> registered;
        nacosRegistry.register(this.serviceUrl);
        nacosRegistry.register(serviceUrlWithoutCategory);
        registered = nacosRegistry.getRegistered();
        Assertions.assertTrue(registered.contains(serviceUrl));
        Assertions.assertTrue(registered.contains(serviceUrlWithoutCategory));
        Assertions.assertEquals(2, registered.size());

        URL serviceUrlWithWildcard = URL.valueOf("nacos://127.0.0.1:3333/" + serviceInterface
                + "?interface=org.apache.dubbo.registry.nacos.NacosService"
                + "&notify=false&methods=test1,test2&category=providers&version=*&group=default");

        URL serviceUrlWithOutWildcard = URL.valueOf("nacos://127.0.0.1:3333/" + serviceInterface
                + "?interface=org.apache.dubbo.registry.nacos.NacosService"
                + "&notify=false&methods=test1,test2&category=providers&version=1.0.0&group=default");

        NotifyListener listener = mock(NotifyListener.class);
        nacosRegistry.subscribe(serviceUrlWithWildcard, listener);
        nacosRegistry.subscribe(serviceUrlWithOutWildcard, listener);

        Map<URL, Set<NotifyListener>> subscribed = nacosRegistry.getSubscribed();

        Assertions.assertEquals(2, registered.size());
        Assertions.assertEquals(1, subscribed.get(serviceUrlWithOutWildcard).size());

        Assertions.assertEquals(2, registered.size());
        Assertions.assertEquals(1, subscribed.get(serviceUrlWithWildcard).size());
    }