Use JUnit4 expected exceptions instead of manual catch.