Write it only if you mean it.
On Twitter, Sally Hogshead (one of my most favorite people!) asked, “How well do you need to know someone before endorsing them on LinkedIn?” My tweet back was: “I’d say well enough to give an authentic endorsement. I was asked to give one by someone I never worked with. Huh?!?” What’s the big deal? Why not just write a testimonial or endorsement for anyone who asks? It’s simple, fast and easy to do it and nobody gets hurt.