HazelcastService { protected Member findClusterMember(String region) { Set<Member> clusterMember = hazelcastInstance.getCluster().getMembers(); for (Member member: clusterMember) { if (member.getAttributes().containsKey(REGION_ATTR_KEY) && region.equals(member.getAttributes().get(REGION_ATTR_KEY))) { return member; } } throw new IllegalArgumentException(region + " is not clustered region."); }  T submitToRegion(String executorName, Callable<T> task, String region); List<T> submitToAllRegion(String executorName, Callable<T> task); void publish(String topic, TopicEvent event); void put(String map, Object key, Object value); void delete(String map, Object key); List getValuesAsList(String map); V get(String map, K key); V getOrDefault(String map, K key, V defaultValue);  }
@Test(expected = IllegalArgumentException.class) public void findClusterMemberTest() { String currentRegion = config.getRegion(); assertThat(hazelcastService.findClusterMember(currentRegion)).isNotNull(); assertThat(hazelcastService.findClusterMember("NotRegisteredRegion")); }