David Howie, 18, from Paisley, was giving evidence at the trial of Lee Anderson, 31, who denies murdering Mr Ali at the Sunshine Grocers in Paisley, on June 15, 2012.
Mr Howie, a student at Stirling University, told the High Court in Glasgow he went into to the shop to buy vodka. He said he was 17 at the time and worried Mr Ali would refuse to serve him.
He said: "I saw Javaid Ali and a man with a black hood. I remember Javaid's face looking tense. He was uncomfortable."
He said he was 80% sure Anderson was the hooded man he saw with Mr Ali.
Prosecutor John Scullion brought all the men incriminated by Anderson for the murder of Mr Ali into court one by one and after each man had appeared asked Mr Howie: "Is he the hooded male who was in the Sunshine Grocers?" Each time Mr Howie replied: "No not at all." Mr Howie said that he had worked with an artist to produce an image of the hooded man and that had helped him to remember.
Mr Scullion said: "Perhaps a minute or minute before Javaid Ali phoned the emergency services you left him in the shop with a hooded man." Mr Howie said: 'Yes."
He will be cross-examined by defence QC Brian McConnachie today. Anderson denies all the charges.
The trial continues.