MULE-7292 - pull request feedback: replace boolean to check when exception was thrown with junit rule ExpectedException