I can easily see how this 'joke' was at the very least in poor taste and teaching staff should be resilient enough to learn from their mistakes.
The school/teachers occupy a position of structural power in relation to pupils and should act responsibly. Schools and teachers need to be able to handle the stress of SATs which measure their effectiveness without playing cruel jokes on DC that are caught up in this (temporary) policy.
People in positions of power should not tell lies that are intended to cause distress albeit shortlived. The fact that the same source of the distressing lies then plays the role of hero/rescuer by making it all alright (ie revealing the truth) actually makes things worse.
Imagine the HT calling a special meeting of teaching staff to announce a surprise visit by OFSTED the next day, watching the ensuing panic, and then says it was a joke (ie lie).
Or a manager calling work staff to a special meeting and announcing redundancies/closure/official inspection, watching the response for 5 minutes, and then saying 'gotcha - you are so gullible, lacking in resilience'.
Or a partner wanting to talk and announcing they were leaving the next day and then saying 'just joking - I've booked a table at a restaurant.
Or a parent telling their child they have minor surgery the next day and then after 5 minutes saying 'just joking, we are really going to the cinema'.
This sort of behaviour teaches mistrust, not resilience.