Osman Samiuddin is a senior editor at ESPNcricinfo
Before this series began, Pakistan were faced with a few questions. Some were familiar ones, like who should open. Others were new - who replaces Misbah-ul-Haq and Younis Khan in the middle order, and how does that impact the order?
Nine days into the series, 1-0 down to a side one place below in the Test rankings, and faced with the very real prospect of losing a long-standing unbeaten home record, coach Mickey Arthur admitted their answers to these questions were wrong.
Babar Azam was out for a two-ball duck on the fourth evening of the second Test in Dubai (just before a break again), which means he is averaging less than 19 in his last eight Tests. This was his fifth duck in his last six Tests and yet his place in the XI has never really been in any doubt. Arthur has been among his biggest supporters but even his faith has been shaken.
Arthur: It's a bit of a worry. It is a worry. I've got a lot of faith in Babar because I think he is a very good player. But his white-ball form needs to start transforming into Test form. He's had a very slow start to his Test career, for a player of his ability. I'm still confident that he will come through and that he will be a very good player for Pakistan going forward. We've just got to guide him through as best we can."
Babar has been part of a broader problem with the order. Pakistan have shuffled their order around, which has resulted in moving Azhar Ali down to one down, Asad Shafiq up to four and Babar down to five. Before the series, Arthur's logic was that the side's best batsmen should be in the middle order. That has plainly not worked.
Arthur: It's kept me awake at night to be honest. It's tough. I thought we had it nailed I've got to be honest. I was comfortable that we had the right combinations. I was comfortable we had enough left-hand, right-hand combinations. I thought we had the next best batsmen available in Pakistan playing for us. I'll be honest I'm not 100% sure now.
And before we tour again, we've got a long break now before we go to England, we're going to have to sit down and really apply our minds and have a look again as to what we think is our best top six going forward.
One of the casualties of the reshuffle has been Shafiq. At No. 4, though he has not looked out of place exactly, he has just not scored runs, which is part of a run of form that stretches back a while. A move down to five in the second innings at Dubai has immediately resulted in his first fifty since the Boxing Day Test in Australia last year, with potentially more to come. Was it a mistake to move him up?
Arthur: It's still too early to say. I would've loved Asad to be playing the innings he is from No. 4 because that just solves the problem for us. With him going down to five, it throws up another conundrum for us because he's playing so well at five, is that his right position? I'm not so sure. We're going to have to really apply our minds going forward with what our right top six is.
An easier decision is likely to be about one of the openers. Shan Masood started this series with a bright fifty in Abu Dhabi but has since fallen off sharply. He struggled especially on the fourth afternoon in Dubai, for a 101-ball 21, which held back Pakistan's start to the chase. Despite not impressing in West Indies for which he was recalled, he was persisted with here.
Arthur: In terms of rationale one of the things always pointed out about Pakistan cricket is that there hasn't been any continuity. We've tried to get continuity with our players, albeit the right decision or the wrong decision. We've tried to create continuity - Pakistan cricket is synonymous with dropping players, bringing them back, dropping them again, bringing them back again. We want to give guys an opportunity and then we can make a proper decision on it.
Has our opening partnership worked for us in this series? It probably hasn't but that is something we'll discuss going forward. The easy option would be Azhar going back up and that then opens another position at no. 3. At the moment we've got a lot of soul searching to do to figure out what our best top six is.
And finally, the bowling attack. It seems wrong to blame the bowling attack in a series in which the batsmen failed to chase 136 in one Test and have struggled in the other Test. But the decision to move from two spinners to three pacers has been a significant one. It is also one, Arthur said, he got wrong.
Arthur: We just thought it was our best possible attack, whether that was right or wrong, it's something I need to get my head around. I've come from and coached in places where pace dominates and wins games. I've got to get my thinking round these totally different conditions.
Whether we like it or not though our attack has done a job. We should've chased down 136 in Abu Dhabi. Without a doubt. And then we would've said the attack has done its job.
The other thing is, no disrespect to the spinners we've got because they're young, but if it's Yasir Shah and Saeed Ajmal, it's a no-brainer. But we don't have Saeed Ajmal as the second spinner. We're working with a set of young spinners. Bilal Asif and Mohammad Asghar have worked the house down. Asghar will be good. When we give him that opportunity is something we need to look at. And perhaps the opportunity was here. Maybe tactically I messed up on that.
Strategically when we set about looking at how we'd go about this, we asked for wickets that did a little bit more than they have done. We asked for a little bit more grass because that would nullify Sri Lanka's spinners and give our quick bowlers an opportunity. Whether that can happen in the UAE, I'm not sure. Maybe that was a pipe dream as far as I was concerned. But that was our strategy going into the series.
Sri Lanka vs Pakistan
PAK in UAE