Test comparator and complex priority logic.