unit test with expecting exception

Can I specify JUnit's "expected" parameter for ITestCase?
An equivalent of
@Test (expected=IndexOutOfBoundsException.class)
0
1 comment
nvm, found myself.
That's "assert throws" statement
list<int> list = null; 
assert list.get(1); throws NullPointerException <no message>;
0

Please sign in to leave a comment.