Hi,

I'm using JUnit 4.7 and Spring 3.0.1. The problem is that I can't write tests that are testing that certain exceptions are thrown using the @Test(expected...) annotation.

I've tried it with this simple scenario here:

@Test(expected=IndexOutOfBoundsException.class)
public void testIndexOutOfBoundsException() {
ArrayList emptyList = new ArrayList();
Object o = emptyList.get(0);
}

and I still get a failure.

Is there something that I'm missing?

Thanks...