}
public void verifyTo(BehaviourListener listener) {
try {
invokeBehaviourMethod();
listener.gotResult(new BehaviourMethodResult(this));
}
catch (InvocationTargetException e) {
listener.gotResult(new BehaviourMethodResult(this, e.getTargetException()));
}
catch (Throwable e) {
throw new JBehaveFrameworkError("Problem verifying method " + method.getName(), e);
}
}