private static String getMergedProperty(Properties userConnectionProperties,
      String valueFromJdbcUri, String propertyKey, String defaultValue) {
    String value = null;
    if (userConnectionProperties != null) {
      value = (String) userConnectionProperties.remove(propertyKey);
    }
    if (value == null || value.isEmpty()) {
      value = valueFromJdbcUri;
    }
    if (value == null || value.isEmpty()) {
      value = defaultValue;
    }
    return value;
  }
Merge the connection properties read from beeline-hs2-connection.xml with the
JdbcConnectionParams extracted from the jdbc url specified in beeline.xml

@param userConnectionProperties
@param jdbcConnectionParams
@return
@throws BeelineHS2ConnectionFileParseException
beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java