Merge "Refactor share metadata tests"