@Override
    public void close() {
        if (Objects.nonNull(etcdClient)) {
            etcdClient.close();
        }
    }
@Test
    public void testZookeeperInstanceRegisterRepository() throws Exception {

        EtcdClient etcdClient = mock(EtcdClient.class);
        PluginDataSubscriber pluginDataSubscriber = mock(PluginDataSubscriber.class);
        doAnswer(invocationOnMock -> {
            BiConsumer<String, String> updateHandler = invocationOnMock.getArgument(1);
            updateHandler.accept("updateData", "{}");
            Consumer<String> deleteHandler = invocationOnMock.getArgument(2);
            String pluginName = invocationOnMock.getArgument(0);
            deleteHandler.accept(pluginName + "removeKey");
            return null;
        }).when(etcdClient).watchChildChange(any(), any(), any());
        when(etcdClient.getChildrenKeys(any(), any())).thenReturn(Collections.singletonList("test"));
        final AuthDataSubscriber authDataSubscriber = mock(AuthDataSubscriber.class);
        final MetaDataSubscriber metaDataSubscriber = mock(MetaDataSubscriber.class);
        final ProxySelectorDataSubscriber proxySelectorDataSubscriber = mock(ProxySelectorDataSubscriber.class);
        final DiscoveryUpstreamDataSubscriber discoveryUpstreamDataSubscriber = mock(DiscoveryUpstreamDataSubscriber.class);
        final EtcdSyncDataService zookeeperSyncDataService = new EtcdSyncDataService(etcdClient,
                pluginDataSubscriber, Collections.singletonList(metaDataSubscriber), Collections.singletonList(authDataSubscriber),
                Collections.singletonList(proxySelectorDataSubscriber), Collections.singletonList(discoveryUpstreamDataSubscriber));

        zookeeperSyncDataService.close();
    }