Unit tests for functions that handle user groups