docs: @SuppressWarnings("unchecked")
    protected static NodeDiscoveryProvider buildLocationProvider(ClusterConfig config) {
      NodeDiscoveryConfig discoveryProviderConfig = config.getDiscoveryConfig();
      if (discoveryProviderConfig != null) {
        return discoveryProviderConfig.getType().newProvider(discoveryProviderConfig);
      }
      if (config.getMulticastConfig().isEnabled()) {
        return new MulticastDiscoveryProvider(new MulticastDiscoveryConfig());
      } else {
        return new BootstrapDiscoveryProvider(Collections.emptyList());
      }
    }