@Test
	void testPreferIpAddress() {
		TestPropertyValues.of("eureka.instance.preferIpAddress:true").applyTo(this.context);
		setupContext();
		EurekaInstanceConfigBean instance = getInstanceConfig();
		assertThat(getInstanceConfig().getHostname().equals(instance.getIpAddress()))
			.as("Wrong hostname: " + instance.getHostname())
			.isTrue();

	}
@author Dave Syer
@author Spencer Gibb
@author Ryan Baxter
@author Tim Ysewyn
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/EurekaInstanceConfigBeanTests.java