class KeyCloakGroupManager extends BaseKeyCloakManager implements GroupManager,
                                                                         ContextualManager {

    @Override
    public List<Group> getAll() throws SecurityManagementException {
        final List<Group> roles = new LinkedList<>();
        consumeRealm(realmResource -> {
            final RolesResource rolesResource = realmResource.roles();
            final List<RoleRepresentation> roleRepresentations = rolesResource.list();
            if (roleRepresentations != null && !roleRepresentations.isEmpty()) {
                for (RoleRepresentation role : roleRepresentations) {
                    final String name = role.getName();
                    final Group group = createGroup(name);
                    roles.add(group);
                }
            }
        });
        return roles;
    }

    public  KeyCloakGroupManager();

}