Tests for cardinality aggregator. Helped to find and fix bug in cardinality comparator.