Add getGroups() method and asserts to groups