code: public String getValueWithDefault(String keyMsgType, String defaultVal) {
          return keyToValue.getOrDefault(keyMsgType, defaultVal);
      }
docs: Gets the value associated with the key from the message if it exists in the underlying map.
  This version returns the default value if it does not exist.
  @param keyMsgType the key to obtain
  @return the associated value or the default