If you're using Junit 4, use the expected behavior:
@Test(expected=SomeException.class)
public void testThings() {
// do stuff
}
If you're using Junit 3, you'll have to catch it
public void test() {
try {
// do stuff
fail("Expected SomeException");
} catch (SomeException e) {
}
}