### Question:
WorkerRegistry { public void unRegistry() { String address = getLocalAddress(); Set<String> workerZkPaths = getWorkerZkPaths(); for (String workerZkPath : workerZkPaths) { zookeeperRegistryCenter.getZookeeperCachedOperator().remove(workerZkPath); logger.info("worker node : {} unRegistry from ZK {}.", address, workerZkPath); } this.heartBeatExecutor.shutdownNow(); }  @PostConstruct void init(); void registry(); void unRegistry();  }### Answer:
@Test public void testUnRegistry() { workerRegistry.init(); workerRegistry.registry(); workerRegistry.unRegistry(); String workerPath = zookeeperRegistryCenter.getWorkerPath(); for (String workerGroup : workerConfig.getWorkerGroups()) { String workerGroupPath = workerPath + "/" + workerGroup.trim(); List<String> childrenKeys = zookeeperRegistryCenter.getZookeeperCachedOperator().getChildrenKeys(workerGroupPath); Assert.assertTrue(childrenKeys.isEmpty()); } workerConfig.getWorkerGroups().remove(TEST_WORKER_GROUP); workerConfig.getWorkerGroups().remove(DEFAULT_WORKER_GROUP); workerRegistry.init(); workerRegistry.registry(); workerRegistry.unRegistry(); }