}
private void validateProblem(Map<ValidationConstraint, Integer> expectedProblems, String level) {
Iterator<ValidationConstraint> constraints = expectedProblems.keySet().iterator();
while (constraints.hasNext()) {
ValidationConstraint constraint = constraints.next();
Integer problemOccurance = expectedProblems.get(constraint);
if (problemOccurance > 0) {
logMissingConstraint(constraint, level, problemOccurance);
} else if (problemOccurance < 0) {
logUnexpectedConstraint(constraint, level, problemOccurance * -1);