Australian opener David Warner played the last of his 112 Tests to end a glittering and controversal career against Pakistan in Sydney on Saturday.