Lanka won the Test series to spoil Pakistan`s perfect record at their adopted home of UAE in seven years.