Refactor share tests