protected Class<? extends Throwable> getExpectedException() {
Test annotation = fMethod.getAnnotation(Test.class);
if (annotation == null || annotation.expected() == None.class) {
return null;
} else {
return annotation.expected();
}
}
boolean isUnexpected(Throwable exception) {
return !getExpectedException().isAssignableFrom(exception.getClass());