class HostnameBasedUrlRandomizer implements EndpointUtils.ServiceUrlRandomizer {

	private static final String EUREKA_INSTANCE_HOSTNAME = "eureka.instance.hostname";

	private final String hostname;

	HostnameBasedUrlRandomizer(String hostname) {
		this.hostname = hostname;
	}

	@Override
	public void randomize(List<String> urlList) {
		int listSize = 0;
		if (urlList != null) {
			listSize = urlList.size();
		}
		if (!StringUtils.hasText(hostname) || listSize == 0) {
			return;
		}
		// Find the hashcode of the instance hostname and use it to find an entry
		// and then arrange the rest of the entries after this entry.
		int instanceHashcode = hostname.hashCode();
		if (instanceHashcode < 0) {
			instanceHashcode = instanceHashcode * -1;
		}
		int backupInstance = instanceHashcode % listSize;
		for (int i = 0; i < backupInstance; i++) {
			String zone = urlList.remove(0);
			urlList.add(zone);
		}
	}

	public static String getEurekaUrl(EurekaClientConfig config, String hostname) {
		List<String> urls = EndpointUtils.getDiscoveryServiceUrls(config, EurekaClientConfigBean.DEFAULT_ZONE,
				new HostnameBasedUrlRandomizer(hostname));
		return urls.get(0);
	}

	public static DefaultEndpoint randomEndpoint(EurekaClientConfig config, Environment env) {
		String hostname = env.getProperty(EUREKA_INSTANCE_HOSTNAME);
		return new DefaultEndpoint(getEurekaUrl(config, hostname));
	}

	public static DefaultEndpoint randomEndpoint(EurekaClientConfig config, Binder binder) {<FILL_FUNCTION_BODY>}

	public static DefaultEndpoint randomEndpoint(EurekaClientConfig config, PropertyResolver propertyResolver) {
		String hostname = propertyResolver.get(EUREKA_INSTANCE_HOSTNAME, String.class, null);
		return new DefaultEndpoint(getEurekaUrl(config, hostname));
	}

}

		String hostname = binder.bind(EUREKA_INSTANCE_HOSTNAME, String.class).orElseGet(() -> null);
		return new DefaultEndpoint(getEurekaUrl(config, hostname));
	
<no_super_class>