code: static ClosableResolver<AwsEndpoint> compositeQueryResolver(
              final ClusterResolver<AwsEndpoint> remoteResolver,
              final ClusterResolver<AwsEndpoint> localResolver,
              final EurekaClientConfig clientConfig,
              final EurekaTransportConfig transportConfig,
              final InstanceInfo myInstanceInfo) {
          String[] availZones = clientConfig.getAvailabilityZones(clientConfig.getRegion());
          String myZone = InstanceInfo.getZone(availZones, myInstanceInfo);
  
          ClusterResolver<AwsEndpoint> compositeResolver = new ClusterResolver<AwsEndpoint>() {
              @Override
              public String getRegion() {
                  return clientConfig.getRegion();
              }
  
              @Override
              public List<AwsEndpoint> getClusterEndpoints() {
                  List<AwsEndpoint> result = localResolver.getClusterEndpoints();
                  if (result.isEmpty()) {
                      result = remoteResolver.getClusterEndpoints();
                  }
  
                  return result;
              }
          };
  
          return new AsyncResolver<>(
                  EurekaClientNames.QUERY,
                  new ZoneAffinityClusterResolver(compositeResolver, myZone, true),
                  transportConfig.getAsyncExecutorThreadPoolSize(),
                  transportConfig.getAsyncResolverRefreshIntervalMs(),
                  transportConfig.getAsyncResolverWarmUpTimeoutMs()
          );
      }
docs: /* testing