[hibernate-issues] [JIRA] (HSEARCH-3201) Use a safe pattern to check for exception in tests