@Override
    public Boolean exists(final String key) {
        try {
            return null != client.checkExists().forPath(key);
        } catch (Exception e) {
            throw new ShenyuException(e);
        }
    }
@Test
    void testExists() throws Exception {
        assertThrows(ShenyuException.class, () -> zookeeperDiscoveryServiceUnderTest.exists("key"));
        ExistsBuilderImpl existsBuilder = mock(ExistsBuilderImpl.class);
        when(curatorFramework.checkExists()).thenReturn(existsBuilder);
        when(existsBuilder.forPath(anyString())).thenReturn(mock(Stat.class));
        final Boolean result = zookeeperDiscoveryServiceUnderTest.exists("key");
        Assertions.assertTrue(result);
    }