Added tests for selection by groups and collections.