public List<String> getServices() {
        try {
            return Optional.of(nacosServiceDiscovery.getServices()).map(services -> {
                ServiceCache.setServiceIds(services);
                return services;
            }).get();
        } catch (NacosException e) {
            LOGGER.log(Level.SEVERE, String.format(Locale.ENGLISH, "getServices failed，"
                    + "isFailureToleranceEnabled={%s}", nacosRegisterConfig.isFailureToleranceEnabled()), e);
            return nacosRegisterConfig.isFailureToleranceEnabled() ? ServiceCache.getServiceIds()
                    : Collections.emptyList();
        }
    }
@Test
    public void testGetServices() throws NacosException {
        mockNamingService();
        Assert.assertNotNull(nacosClient.getServices());
    }