code: public static void applyUserAgent(String agent) {
      LOGGER.info("Applying agent: " + agent);
      System.setProperty("http.agent", agent);
      System.setProperty("https.agent", agent);
    }
docs: Apply User Agent
  
  @param agent Agent to apply