Tests for sortGroups, sortIntervals, and orderBy