: In JUnit4, use the @Test(expected) annotation to denote tests that should throw exceptions.
More Information