That's what I tried initially, but the exception gets wrapped in an UncheckedExecutionException and it seemed unclear to use that as the expected exception in the Test annotation.