Fix usage of incorrect '@expectedMessage' annotation in tests