public static String test(LDAPServerBean server) {
		logger.debug("Start to test the ldap server is useful??");
		Hashtable<Object, Object> env = new Hashtable<Object, Object>();
		env.put(Context.INITIAL_CONTEXT_FACTORY,
				server.getInitial_context_factory());
		env.put(Context.PROVIDER_URL, server.getServerHost());
		env.put(Context.SECURITY_AUTHENTICATION,
				server.getSecurity_authentication());
		env.put(Context.SECURITY_PRINCIPAL, server.getUser());
		env.put(Context.SECURITY_CREDENTIALS, server.getPassword());
		try {
			context = new InitialDirContext(env);
			if (context != null) {
				logger.debug("Initial the Dir Context successfully.");
			}
		} catch (javax.naming.AuthenticationException e) {
			logger.debug(e.toString());
			logger.debug(FinalString.LDAP_AUTHENTICATION_ERROR);
			return FinalString.LDAP_AUTHENTICATION_ERROR;
		} catch (Exception e) {
			logger.debug(e.toString());
			logger.debug(FinalString.UNKNOWN_ERROR);
			return FinalString.UNKNOWN_ERROR;
		}
		return FinalString.LDAP_TEST_SUCCESS;
	}