I'm trying to write some Spock tests for JMockit (to test Groovy / Spock support I'm working on) and stumbled over the problem that there is no good way to verify a thrown exception by some interceptor. JMockit will validate in a feature method interceptor some expectations and throw an exception if they are not satisfied.
As this happens right after the feature method, using thrown() does not work, as it happens too soon.
Using a JUnit ExpectedException rule does not work either, as the BaseSpecRunner catches and somehow handles the exception, so that you cannot catch it in a JUnit rule.
This same problem exists for any Spock extensions that should be tested with spock and that does some checks in a feature method interceptor and eventually throws an exception.
I just found @FailsWith, but that also does not work, as the JMockit interceptor that throws the exception seems to wrap the FailsWithInterceptor and so the FailsWithInterceptor complains that no exception was thrown.