### Question:
MasterRegistry { public void unRegistry() { String address = getLocalAddress(); String localNodePath = getMasterPath(); heartBeatExecutor.shutdownNow(); zookeeperRegistryCenter.getZookeeperCachedOperator().remove(localNodePath); logger.info("master node : {} unRegistry from ZK path {}." , address, localNodePath); }  @PostConstruct void init(); void registry(); void unRegistry();  }### Answer:
@Test public void testUnRegistry() throws InterruptedException { masterRegistry.init(); masterRegistry.registry(); TimeUnit.SECONDS.sleep(masterConfig.getMasterHeartbeatInterval() + 2); masterRegistry.unRegistry(); String masterPath = zookeeperRegistryCenter.getMasterPath(); List<String> childrenKeys = zookeeperRegistryCenter.getZookeeperCachedOperator().getChildrenKeys(masterPath); Assert.assertTrue(childrenKeys.isEmpty()); }