docs: protected final Endpoint endpoint() throws UnknownHostException {
          final Set<InetSocketAddress> hosts = hosts();
          checkState(!hosts.isEmpty(), "no hosts were added.");
  
          final InetSocketAddress firstHost = Iterables.getFirst(hosts, null);
          final Endpoint endpoint;
          if (hosts.size() == 1 && !firstHost.isUnresolved()) {
              endpoint = toResolvedHostEndpoint(firstHost);
          } else {
              final String groupName;
              if (selectedProfile() != null) {
                  // Generate a group name from profile name.
                  groupName = "centraldogma-profile-" + selectedProfile();
              } else {
                  // Generate an anonymous group name with an arbitrary integer.
                  groupName = "centraldogma-anonymous-" + nextAnonymousGroupId.getAndIncrement();
              }
  
              final List<Endpoint> staticEndpoints = new ArrayList<>();
              final List<EndpointGroup> groups = new ArrayList<>();
              for (final InetSocketAddress addr : hosts) {
                  if (addr.isUnresolved()) {
                      groups.add(new DnsAddressEndpointGroupBuilder(addr.getHostString())
                              .eventLoop(clientFactory.eventLoopGroup().next())
                              .port(addr.getPort())
                              .build());
                  } else {
                      staticEndpoints.add(toResolvedHostEndpoint(addr));
                  }
              }
  
              if (!staticEndpoints.isEmpty()) {
                  groups.add(new StaticEndpointGroup(staticEndpoints));
              }
  
              EndpointGroup group;
              if (groups.size() == 1) {
                  group = groups.get(0);
              } else {
                  group = new CompositeEndpointGroup(groups);
              }
  
              if (group instanceof DynamicEndpointGroup) {
                  // Wait until the initial endpoint list is ready.
                  try {
                      ((DynamicEndpointGroup) group).awaitInitialEndpoints(10, TimeUnit.SECONDS);
                  } catch (Exception e) {
                      final UnknownHostException cause = new UnknownHostException(
                              "failed to resolve any of: " + hosts);
                      cause.initCause(e);
                      throw cause;
                  }
              }
  
              if (!healthCheckInterval.isZero()) {
                  group = new HttpHealthCheckedEndpointGroupBuilder(group, HttpApiV1Constants.HEALTH_CHECK_PATH)
                          .clientFactory(clientFactory)
                          .protocol(isUseTls() ? SessionProtocol.HTTPS : SessionProtocol.HTTP)
                          .retryInterval(healthCheckInterval)
                          .build();
              }
  
              EndpointGroupRegistry.register(groupName, group, EndpointSelectionStrategy.ROUND_ROBIN);
              endpoint = Endpoint.ofGroup(groupName);
          }
          return endpoint;
      }