Insomnia because of coffee

Kitty
My hubby and I went to buy nespressor machine yesterday and I tried two tiny cups of expresso: chocolate flavored and ginger chocolate because the machine and coffee were bought at two different shops which both provided tasting. 
Then I woke up at 3 am and couldn't go back to sleep until 6. Just woke up at 10. Is this because of the caffine?