class GrpcUmsClient {

    public List<String> listWorkloadAdministrationGroupsForMember(
            String actorCrn, String memberCrn, Optional<String> requestId) {
        requireNonNull(memberCrn);

        List<String> wags = new ArrayList<>();

        try (ManagedChannelWrapper channelWrapper = makeWrapper()) {
            UmsClient client = makeClient(channelWrapper.getChannel(), actorCrn);
            LOGGER.debug("Getting workload administration groups for member {}", memberCrn);
            UserManagementProto.ListWorkloadAdministrationGroupsForMemberResponse response;
            Optional<PagingProto.PageToken> pageToken = Optional.empty();
            do {
                response = client.listWorkloadAdministrationGroupsForMember(
                        requestId.orElse(UUID.randomUUID().toString()), memberCrn, pageToken);
                wags.addAll(response.getWorkloadAdministrationGroupNameList());
                pageToken = Optional.ofNullable(response.getNextPageToken());
            } while (response.hasNextPageToken());
        }
        LOGGER.debug("{} workload administration groups found for member {}", wags.size(), memberCrn);
        return wags;
    }

}