Added tests for hasGroup