RoundRobinClient { public Set<String> getGroupMemberURLsSet() { discoverGroupMembers(); Set<String> urls = new HashSet<String>(); urls.addAll(groupMemberURLs); return urls; } RoundRobinClient();  RoundRobinClient(String groupName); List<String> getGroupMemberURLsList(); Set<String> getGroupMemberURLsSet(); void setGroupName(String groupName); static final String SEPARATOR_BETWEEN_MSG_KEY_AND_GROUP_NAME; }
@Test public void testConcurrentRoundRobinClient() { new Thread(){ @Override public void run() { RoundRobinClient rrc = new RoundRobinClient(); for(String s : rrc.getGroupMemberURLsSet()) { logger.info("####################" +s); } } }.start(); nap(100); new Thread(){ @Override public void run() { RoundRobinClient rrc = new RoundRobinClient(); for(String s : rrc.getGroupMemberURLsSet()) { logger.info("####################" +s); } } }.start(); nap(10000); }