java unit test exceptions code example
Example: expected exception junit
@Test(expected = SomeException.class)
public void testName() {
//some code
}
@Test(expected = SomeException.class)
public void testName() {
//some code
}