How can I use JUnit4 idiomatically to test that some code throws an exception?
While I can certainly do something like this:
@Test public void testFo
You can also do this:
@Test public void testFooThrowsIndexOutOfBoundsException() { try { foo.doStuff(); assert false; } catch (IndexOutOfBoundsException e) { assert true; } }