David Villa and Fernando Llorente scored for the European champions on 36 and 83 minutes respectively in a one-sided game.
Valencia striker Villa hit the opener after releasing an unstoppable shot that went past David James, before Llorente headed Xavi Hernandez's cross into the net.
In Marseille, Argentina registered a 2-0 win over France in another exhibition game.
Jonas Gutierrez opened the scoring from inside the penalty area four minutes from the interval, and the phenomenal Lionel Messi ensured the Tango Dancers' win on 83 minutes.
In other warm-up games, Germany lost 1-0 at home to Norway, and Portugal defeated Finland 1-0, thanks to Cristiano Ronaldo's winner.
Elsewhere,Tunisia held Holland to a 1-1 draw, while Turkey-Ivory Coast, Greece-Denmark matches ended in the same result.