Alternatively, you could get rid of ``failWithExceptionOfKind``:

```
@Test(expected=classOf[IOException])
def ioExceptionsByLuceneAreCaughtWhenAddingOccurrences() { 
  val index = mockedIndexIOException
  val r = index.addOccurrences(Nil, project.underlying)
  r.get
}
```