code: public PagedList<EventHubConsumerGroupInfoInner> listEventHubConsumerGroups(final String resourceGroupName, final String resourceName, final String eventHubEndpointName) {
          ServiceResponse<Page<EventHubConsumerGroupInfoInner>> response = listEventHubConsumerGroupsSinglePageAsync(resourceGroupName, resourceName, eventHubEndpointName).toBlocking().single();
          return new PagedList<EventHubConsumerGroupInfoInner>(response.body()) {
              @Override
              public Page<EventHubConsumerGroupInfoInner> nextPage(String nextPageLink) {
                  return listEventHubConsumerGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
  Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
  
  @param resourceGroupName The name of the resource group that contains the IoT hub.
  @param resourceName The name of the IoT hub.
  @param eventHubEndpointName The name of the Event Hub-compatible endpoint.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws ErrorDetailsException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the PagedList&lt;EventHubConsumerGroupInfoInner&gt; object if successful.