Get utils.ensureDbName function and tests