code: public PagedList<EndpointHealthDataInner> getEndpointHealth(final String resourceGroupName, final String iotHubName) {
          ServiceResponse<Page<EndpointHealthDataInner>> response = getEndpointHealthSinglePageAsync(resourceGroupName, iotHubName).toBlocking().single();
          return new PagedList<EndpointHealthDataInner>(response.body()) {
              @Override
              public Page<EndpointHealthDataInner> nextPage(String nextPageLink) {
                  return getEndpointHealthNextSinglePageAsync(nextPageLink).toBlocking().single().body();
              }
          };
      }
docs: Get the health for routing endpoints.
  Get the health for routing endpoints.
  
  @param resourceGroupName the String value
  @param iotHubName the String value
  @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;EndpointHealthDataInner&gt; object if successful.