Break out getting SP metadata into a separate test helper