JUnit 4 and annotations



@Test(expected=RuntimeException.class)
public void yourUnitTest() {
     ...
}

This allows you to test an expected exception without any asserts.

Comments