}
public Object accept(IMockInvocation invocation) {
acceptedInvocations.add(invocation);
if (acceptedInvocations.size() > maxCount) {
throw new TooManyInvocationsError(this, acceptedInvocations);
}
return responseGenerator == null ? null : responseGenerator.respond(invocation);
}