### Question:
ZookeeperNodeManager implements InitializingBean { public Set<String> getMasterNodes() { masterLock.lock(); try { return Collections.unmodifiableSet(masterNodes); } finally { masterLock.unlock(); } }  @Override void afterPropertiesSet(); Set<String> getMasterNodes(); Map<String, Set<String>> getWorkerGroupNodes(); Set<String> getWorkerGroupNodes(String workerGroup); void close();  }### Answer:
@Test public void testGetMasterNodes(){ masterRegistry.registry(); try { Thread.sleep(2000); } catch (InterruptedException ignore) { } Set<String> masterNodes = zookeeperNodeManager.getMasterNodes(); Assert.assertTrue(CollectionUtils.isNotEmpty(masterNodes)); Assert.assertEquals(1, masterNodes.size()); Assert.assertEquals(NetUtils.getHost() + ":" + masterConfig.getListenPort(), masterNodes.iterator().next()); workerRegistry.unRegistry(); }