@Override
    public void release() {
        Collection<InstancePublishInfo> instancePublishInfos = publishers.values();
        for (InstancePublishInfo instancePublishInfo : instancePublishInfos) {
            if (instancePublishInfo instanceof BatchInstancePublishInfo) {
                MetricsMonitor.decrementIpCountWithBatchRegister(instancePublishInfo);
            } else {
                MetricsMonitor.getIpCountMonitor().decrementAndGet();
            }
        }
        MetricsMonitor.getSubscriberCount().addAndGet(-1 * subscribers.size());
    }
@Test
    void release() {
        
        abstractClient.addServiceInstance(service, instancePublishInfo);
        assertEquals(1, MetricsMonitor.getIpCountMonitor().get());
        abstractClient.addServiceSubscriber(service, subscriber);
        assertEquals(1, MetricsMonitor.getSubscriberCount().get());
        
        abstractClient.release();
        
        assertEquals(0, MetricsMonitor.getSubscriberCount().get());
        assertEquals(0, MetricsMonitor.getIpCountMonitor().get());
    }