code: public static ResourceList<Endpoint> list(final BandwidthClient client, final String domainId, final int page, final int size) {
          assert(domainId != null);
          assert(page  >= 0);
          assert(size > 0);
          final String resourceUri = String.format(client.getUserResourceUri(BandwidthConstants.ENDPOINTS_URI_PATH), domainId);
          final ResourceList<Endpoint> endpoints = new ResourceList<Endpoint>(page, size, resourceUri, Endpoint.class);
          endpoints.setClient(client);
          endpoints.initialize();
          return endpoints;
      }
docs: Factory method for Endpoint list
  @param client the user client
  @param domainId the domain id.
  @param page the starting page.
  @param size the page size.
  @return the Endpoint list.