@Override
    public void close() {
        if (this.serviceDiscovery == null) {
            return;
        }
        try {
            this.serviceDiscovery.close();
        } catch (IOException ex) {
            LOGGER.log(Level.WARNING, "Stop zookeeper discovery client failed", ex);
        }
    }
@Test
    public void close() throws IOException {
        zkDiscoveryClient.close();
        Mockito.doThrow(new IOException("wrong")).when(serviceDiscovery).close();
        Mockito.verify(serviceDiscovery, Mockito.times(1)).close();
    }