You may put this Assert inside of the first for.
In each for iteration, set containsAllAttributesValues as false, run the inner for, and test the assert.

Putting the Assert outside, lead the code to accept conditions with only one valid attribute.