protected String getBasicAuthentication() {
        String authString = getUserName() + ":" + getPassword();
        byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
        String authStringEnc = new String(authEncBytes);

        return "Basic " + authStringEnc;
    }
Gets the basic authentication string to be used for the Authorization header.

@return - Base-64 encoded authentication string.
ambari-funtest/src/test/java/org/apache/ambari/funtest/server/AmbariHttpWebRequest.java