LdapServerProperties { public List<String> getLdapUrls() { String protocol = useSsl ? "ldaps: if (StringUtils.isEmpty(primaryUrl)) { return Collections.emptyList(); } else { List<String> list = new ArrayList<String>(); list.add(protocol + primaryUrl); if (!StringUtils.isEmpty(secondaryUrl)) { list.add(protocol + secondaryUrl); } return list; } }  List<String> getLdapUrls(); String getPrimaryUrl(); void setPrimaryUrl(String primaryUrl); String getSecondaryUrl(); void setSecondaryUrl(String secondaryUrl); boolean isUseSsl(); void setUseSsl(boolean useSsl); boolean isAnonymousBind(); void setAnonymousBind(boolean anonymousBind); String getManagerDn(); void setManagerDn(String managerDn); String getManagerPassword(); void setManagerPassword(String managerPassword); String getBaseDN(); void setBaseDN(String baseDN); String getUserSearchBase(); void setUserSearchBase(String userSearchBase); String getUserSearchFilter(boolean useAlternateUserSearchFilter); String getUsernameAttribute(); void setUsernameAttribute(String usernameAttribute); void setForceUsernameToLowercase(boolean forceUsernameToLowercase); boolean isForceUsernameToLowercase(); String getGroupBase(); void setGroupBase(String groupBase); String getGroupObjectClass(); void setGroupObjectClass(String groupObjectClass); String getGroupMembershipAttr(); void setGroupMembershipAttr(String groupMembershipAttr); String getGroupNamingAttr(); void setGroupNamingAttr(String groupNamingAttr); String getAdminGroupMappingRules(); void setAdminGroupMappingRules(String adminGroupMappingRules); String getGroupSearchFilter(); void setGroupSearchFilter(String groupSearchFilter); void setUserSearchFilter(String userSearchFilter); void setAlternateUserSearchFilter(String alternateUserSearchFilter); boolean isGroupMappingEnabled(); void setGroupMappingEnabled(boolean groupMappingEnabled); void setUserBase(String userBase); void setUserObjectClass(String userObjectClass); String getUserBase(); String getUserObjectClass(); String getDnAttribute(); void setDnAttribute(String dnAttribute); void setReferralMethod(String referralMethod); String getReferralMethod(); boolean isPaginationEnabled(); void setPaginationEnabled(boolean paginationEnabled); String getSyncGroupMemberReplacePattern(); void setSyncGroupMemberReplacePattern(String syncGroupMemberReplacePattern); String getSyncUserMemberReplacePattern(); void setSyncUserMemberReplacePattern(String syncUserMemberReplacePattern); String getSyncUserMemberFilter(); void setSyncUserMemberFilter(String syncUserMemberFilter); String getSyncGroupMemberFilter(); void setSyncGroupMemberFilter(String syncGroupMemberFilter); String getAdminGroupMappingMemberAttr(); void setAdminGroupMappingMemberAttr(String adminGroupMappingMemberAttr); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testGetLdapUrls() throws Exception { List<String> urls = ldapServerProperties.getLdapUrls(); assertEquals(INCORRECT_URL_LIST, 1, urls.size()); assertEquals(INCORRECT_URL_LIST, "ldap: ldapServerProperties.setSecondaryUrl("4.3.2.1:1234"); urls = ldapServerProperties.getLdapUrls(); assertEquals(INCORRECT_URL_LIST, 2, urls.size()); assertEquals(INCORRECT_URL_LIST, "ldap: ldapServerProperties.setUseSsl(true); urls = ldapServerProperties.getLdapUrls(); assertEquals(INCORRECT_URL_LIST, "ldaps: assertEquals(INCORRECT_URL_LIST, "ldaps: }