*
* @param counterWrapper
*/
private void validateActualAgainstExpected(final CounterWrapper counterWrapper) {
if (strictCountersChecking) {
final Errors errors = new Errors(LOG);
Collection<Pair<String, String>> unmatchedCounters = counterWrapper
.findCounterValues();
Collection<Pair<String, String>> findExpectedCounterValues = findExpectedCounterValues();
unmatchedCounters.removeAll(findExpectedCounterValues);
if (!unmatchedCounters.isEmpty()) {
for (Pair<String, String> unmatcherCounter : unmatchedCounters) {
errors
.record(
"Actual counter (\"%s\",\"%s\") was not found in expected counters",
unmatcherCounter.getFirst(), unmatcherCounter.getSecond());
}
}
errors.assertNone();
}
}