JUnit automatically catches exceptions. It considers uncaught exceptions to be errors, which means the above example has redundant code in it.
英
美
- JUnit可以自动的捕捉异常,把没有截获的异常看作错误,所以,上面的代码有冗余代码。