fixes refactoring of expected exception into Junit annotation