private static LdapConnectionSettings makeLdapConnectionSettings() {
Method method = Method.STANDARD;
String hostname = LdapHandlerTest.getHostname();
int port = 389;
String baseDN = LdapHandlerTest.getTestProperties().getProperty("basedn");
LdapConnectionSettings settings;
if (Strings.isNullOrEmpty(TEST_USER)
|| Strings.isNullOrEmpty(TEST_PASSWORD)) {
settings = new LdapConnectionSettings(method, hostname, port, baseDN);
} else {
settings = new LdapConnectionSettings(method, hostname, port, baseDN,
AuthType.SIMPLE, TEST_USER, TEST_PASSWORD);
}
return settings;
}