static SmlHost checkForSmlHostnameOverride(SmlHost smlHost) {
   String smlHostname = GlobalConfiguration.getInstance().getSmlHostname();
   if (!String.valueOf(smlHostname).isEmpty()) {
     log.debug("SML hostname has been overridden: [" + smlHostname + "]");
     smlHost = SmlHost.valueOf(smlHostname);
   }
   return smlHost;
 }
  /**
   * Discovers which SML host should be used.
   *
   * @return the SML host instance to be used
   */
  static SmlHost discoverSmlHost() {
    SmlHost smlHost;
    switch (GlobalConfiguration.getInstance().getModeOfOperation()) {
      case TEST:
        log.warn("Mode of operation is TEST");
        smlHost = SmlHost.TEST_SML;
        break;
      default:
        smlHost = SmlHost.PRODUCTION_SML;
        break;
    }

    // Finally we check to see if the SML hostname has been overridden in the configuration file
    smlHost = checkForSmlHostnameOverride(smlHost);

    log.debug("SML hostname: " + smlHost);
    return smlHost;
  }