public void verify(VerificationData data) {
List<Invocation> invocations = data.getAllInvocations();
InvocationMatcher wanted = data.getWanted();
Reporter reporter = new Reporter();
InvocationsFinder finder = new InvocationsFinder();
List<Invocation> found = finder.findInvocations(invocations, wanted);
int invocationCount = found.size();
if (invocationCount != _wantedNumberOfInvocations) {
LOG.warn("invocation count is " + invocationCount + " expected was " + _wantedNumberOfInvocations + " +-"
+ _aberration);
}
int minNumberOfInvocations = _wantedNumberOfInvocations - _aberration;
if (invocationCount < minNumberOfInvocations) {
Location lastLocation = finder.getLastLocation(invocations);
reporter.tooLittleActualInvocations(new AtLeastDiscrepancy(minNumberOfInvocations, invocationCount), wanted,
lastLocation);
}
int maxNumberOfInvocations = _wantedNumberOfInvocations + _aberration;
if (invocationCount > maxNumberOfInvocations) {