switch (spec.getResult()) {
case SUCCESS:
notifier.fireTestFinished(test);
return;
case FAILURE:
notifier.fireTestFailure(new Failure(test, new TestFailure(spec.getMessage())));
return;
case ERROR:
default:
throw new SpecificationError(spec.getMessage(), spec.getCause());
}