code: private static void prepareMode(Mode providedMode) {
          final String applicationMode = System.getProperty(Key.APPLICATION_MODE.toString());
          if (StringUtils.isNotBlank(applicationMode)) {
              switch (applicationMode.toLowerCase(Locale.ENGLISH)) {
                  case "dev"  : mode = Mode.DEV;
                  break;
                  case "test" : mode = Mode.TEST;
                  break;
                  default     : mode = Mode.PROD;
                  break;
              }
          } else {
              mode = providedMode;
          }
      }
docs: Sets the mode the application is running in
  
  @param providedMode A given mode or null