code: public HttpHeaders setBasicAuthentication(String username, String password) {
      String userPass =
          Preconditions.checkNotNull(username) + ":" + Preconditions.checkNotNull(password);
      String encoded = Base64.encodeBase64String(StringUtils.getBytesUtf8(userPass));
      return setAuthorization("Basic " + encoded);
    }
docs: Sets the {@link #authorization} header as specified in <a
  href="http://tools.ietf.org/html/rfc2617#section-2">Basic Authentication Scheme</a>.
  
  <p>Overriding is only supported for the purpose of calling the super implementation and
  changing the return type, but nothing else.
  
  @since 1.2