@Override
    public void deregisterService(String serviceName, String groupName, Instance instance) throws NacosException {
        NAMING_LOGGER
                .info("[DEREGISTER-SERVICE] {} deregistering service {} with instance: {}", namespaceId, serviceName,
                        instance);
        if (instance.isEphemeral()) {
            deregisterServiceForEphemeral(serviceName, groupName, instance);
        } else {
            doDeregisterServiceForPersistent(serviceName, groupName, instance);
        }
    }
@Test
    void testDeregisterPersistentService() throws NacosException {
        client.deregisterService(SERVICE_NAME, GROUP_NAME, persistentInstance);
        verify(this.rpcClient, times(1)).request(argThat(request -> {
            if (request instanceof PersistentInstanceRequest) {
                PersistentInstanceRequest request1 = (PersistentInstanceRequest) request;
                return request1.getType().equals(NamingRemoteConstants.DE_REGISTER_INSTANCE);
            }
            return false;
        }));
    }