code: public void setUsername(String username) {
          for (Authentication auth : authentications.values()) {
              if (auth instanceof HttpBasicAuth) {
                  ((HttpBasicAuth) auth).setUsername(username);
                  return;
              }
          }
          throw new RuntimeException("No HTTP basic authentication configured!");
      }
docs: Helper method to set username for the first HTTP basic authentication.
  
  @param username Username