unit test for list_groups