{
if (serviceName == null) {
return new ServerDiscoverySelector(new NoopServiceProvider());
}
final ServiceProvider serviceProvider = serviceDiscovery
.serviceProviderBuilder()
.serviceName(CuratorServiceUtils.makeCanonicalServiceName(serviceName))
.build();
return new ServerDiscoverySelector(serviceProvider);
}