public void deregister() {
        if (StringUtils.isEmpty(RegisterContext.INSTANCE.getClientInfo().getServiceId())) {
            LOGGER.warning("No service to de-register for nacos client...");
            return;
        }
        String serviceId = RegisterContext.INSTANCE.getClientInfo().getServiceId();
        String group = nacosRegisterConfig.getGroup();
        try {
            NamingService namingService = nacosServiceManager.getNamingService();
            namingService.deregisterInstance(serviceId, group, instance);
        } catch (NacosException e) {
            LOGGER.log(Level.SEVERE, String.format(Locale.ENGLISH, "failed when deRegister service，"
                    + "serviceId={%s}", serviceId), e);
        }
    }
@Test
    public void testDeregister() throws NacosException {
        mockNamingService();
        nacosClient.deregister();
        Assert.assertNotNull(ReflectUtils.getFieldValue(nacosClient, "instance"));
    }