@@ -0,0 +1,1205 @@
+package org.springframework.cloud.client.discovery;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.SpringApplication;%0Aimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;%0Aimport org.springframework.boot.test.SpringApplicationConfiguration;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0A%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * Tests if @EnableDiscoveryClient is NOT used, then NoopDiscoveryClient is created.%0A * @author Spencer Gibb%0A */%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@SpringApplicationConfiguration(classes = NoopDiscoveryClientImportSelectorTests.App.class)%0Apublic class NoopDiscoveryClientImportSelectorTests %7B%0A%0A%09@Autowired%0A%09DiscoveryClient discoveryClient;%0A%0A%09@Test%0A%09public void testDiscoveryClientIsNoop() %7B%0A%09%09assertTrue(%22discoveryClient is wrong instance type%22, discoveryClient instanceof NoopDiscoveryClient);%0A%09%7D%0A%0A%09@EnableAutoConfiguration%0A%09@Configuration%0A%09public static class App %7B%0A%09%09public static void main(String%5B%5D args) %7B%0A%09%09%09SpringApplication.run(App.class, args);%0A%09%09%7D%0A%09%7D%0A%7D%0A

test if @EnableDiscoveryClient is NOT used that NoopDiscoveryClient gets created