Use method `setExpectedException` instead annotation