@Test
	void shouldCloseDiscoveryClient() throws Exception {
		TestPropertyValues.of("eureka.client.healthcheck.enabled=true").applyTo(this.context);
		setupContext(RefreshAutoConfiguration.class, AutoServiceRegistrationConfiguration.class);

		AtomicBoolean isShutdown = (AtomicBoolean) ReflectionTestUtils.getField(getLazyInitEurekaClient(),
				"isShutdown");

		assertThat(isShutdown.get()).isFalse();

		this.context.close();

		assertThat(isShutdown.get()).isTrue();
	}
@author Spencer Gibb
@author Matt Jenkins
@author Olga Maciaszek-Sharma
@author Tim Ysewyn
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/EurekaClientAutoConfigurationTests.java