Refactor shares tests