Test for former spouse in the morning (4)
'test' is the definition.
'former spouse in the morning' is the wordplay.
'former spouse' becomes 'ex'.
'in the morning' becomes 'am'.
'for' is the link.
(Other definitions for exam that I've seen before include "Test (abbr)", "Set of questions evaluating skill or knowledge, in short", "ordeal at school", "One taken by candidate", "Educational test".)