Unit tests for user group manipulation functions