Pedro's second-half strike handed Spain a narrow victory over Italy in Wednesday's international friendly at the Vicente Calderon.