private static String ensurePathEndsInSlash(String path) {
    if (path == null) {
      throw new NullPointerException("Path cannot be null");
    }
    if (path.endsWith(File.separator)) {
      return path;
    } else {
      return path + File.separator;
    }
  }
Prepares the metastore database for unit tests.
Runs the latest init schema against the database configured in the CONNECT_URL_KEY param.
Ignores any duplication (table, index etc.) So it can be called multiple times for the same database.
@param conf Metastore configuration
@throws Exception Initialization failure
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestTxnDbUtil.java