I take issue with exams that are more difficult than what students have seen before. I have had many exams where the problem was similar to things I had worked on, but with some twist. While I think these types of problems can be useful in promoting understanding rather than memorization, I do not feel they are appropriate for timed, high-stakes exams. Instead the twist and difficulties should be left for untimed, open book problem sets where students can wrestle with the material and work to learn it. Exams should test the basics and the conceptual understanding.
Here is an example of an exam I helped create. While I did not have complete control as this was not my course (I was the teaching assistant), this example does capture some of what I strive for.