What is wrong, as a code to compare against (Spring's getMessageCode()).
getMessageCode()
final SpelMessage messageCode;