code: private String getRegistrationRequestEntity() throws FileNotFoundException {
          // update the registration request with the max concurrent sessions/vms
          final GridNodeConfiguration gnc =
                  GridNodeConfiguration.loadFromJSON(SeLionGridConstants.NODE_SAUCE_CONFIG_FILE);
  
          // get the max concurrent vm's allowed for the account from sauce labs
          final SauceLabsRestApi restApi;
          try {
              restApi = new SauceLabsRestApi();
          } catch (GridConfigurationException e) {
              throw e;
          }
  
          final int maxConcurrent = restApi.getMaxConcurrency();
          if (maxConcurrent != -1) {
              // update max sessions
              gnc.maxSession = maxConcurrent;
  
              // update browser max instances for all saucelabs "browser" types
              for (MutableCapabilities caps : gnc.capabilities) {
                  if (caps.getBrowserName().equals(SAUCELABS_BROWSER_NAME)) {
                      caps.setCapability(MAX_INSTANCES_CONFIG_PROPERTY, maxConcurrent);
                  }
              }
          }
  
          // ensure the proxy host, port, id is set for http://ondemand.saucelabs.com:80
          if (StringUtils.isBlank(gnc.host)) {
              gnc.host = PROXY_HOST;
          }
          if (StringUtils.isBlank(gnc.id)) {
              gnc.id = PROXY_ID;
          }
          if (gnc.port == null || gnc.port < 0) {
              gnc.port = PROXY_PORT;
          }
  
          return new RegistrationRequest(gnc, SeLionSauceProxy.class.getSimpleName(),
                  "SeLion Grid Virtual Sauce Proxy").toJson().toString();
      }
docs: /*
  Update the registration request entity