Add unit tests for hive metastore refresh