MemberValidator { public Set<DistributedMember> findServers(String... groups) { return findMembers(false, groups); } MemberValidator(InternalCache cache, ConfigurationPersistenceService persistenceService); void validateCreate(AbstractConfiguration config, CacheConfigurationManager manager); String[] findGroupsWithThisElement(AbstractConfiguration config,
      CacheConfigurationManager manager); Map<String, AbstractConfiguration> findCacheElement(AbstractConfiguration config,
      CacheConfigurationManager manager); Set<String> findGroups(String regionName); Set<DistributedMember> findServers(String... groups); Set<DistributedMember> findServers(AbstractConfiguration configuration); Set<DistributedMember> findMembers(String id, String... groups); Set<DistributedMember> findMembers(boolean includeLocators, String... groups);  }
@Test public void findServers() { assertThat(validator.findServers()) .flatExtracting(DistributedMember::getName) .containsExactlyInAnyOrder("member1", "member2", "member3", "member4", "member5"); assertThat(validator.findServers()) .flatExtracting(DistributedMember::getName) .containsExactlyInAnyOrder("member1", "member2", "member3", "member4", "member5"); assertThat(validator.findServers("group1")).flatExtracting(DistributedMember::getName) .containsExactlyInAnyOrder("member2", "member4"); assertThat(validator.findServers("group1", "group2")).flatExtracting(DistributedMember::getName) .containsExactlyInAnyOrder("member2", "member3", "member4"); assertThat(validator.findServers("group1", "group3")).flatExtracting(DistributedMember::getName) .containsExactlyInAnyOrder("member2", "member4", "member5"); assertThat(validator.findServers("cluster", "group3")) .flatExtracting(DistributedMember::getName) .containsExactlyInAnyOrder("member1", "member2", "member3", "member4", "member5"); }