@Override
    public Set<String> getServices() {
        return ThrowableFunction.execute(namingService, service -> {
            ListView<String> view = service.getServicesOfServer(0, Integer.MAX_VALUE, group);
            return new LinkedHashSet<>(view.getData());
        });
    }
@Test
    void testGetServices() throws NacosException {
        DefaultServiceInstance serviceInstance =
                createServiceInstance(SERVICE_NAME, LOCALHOST, NetUtils.getAvailablePort());
        // register
        nacosServiceDiscovery.doRegister(serviceInstance);

        ArgumentCaptor<Instance> instance = ArgumentCaptor.forClass(Instance.class);
        verify(namingServiceWrapper, times(1)).registerInstance(any(), eq(group), instance.capture());

        String serviceNameWithoutVersion = "providers:org.apache.dubbo.registry.nacos.NacosService:default";
        String serviceName = "providers:org.apache.dubbo.registry.nacos.NacosService:1.0.0:default";
        List<String> serviceNames = new ArrayList<>();
        serviceNames.add(serviceNameWithoutVersion);
        serviceNames.add(serviceName);
        ListView<String> result = new ListView<>();
        result.setData(serviceNames);
        when(namingServiceWrapper.getServicesOfServer(anyInt(), anyInt(), eq(group)))
                .thenReturn(result);
        Set<String> services = nacosServiceDiscovery.getServices();
        assertEquals(2, services.size());
    }