// Path: spring-cloud-services-spring-connector/src/test/java/io/pivotal/spring/cloud/MockCloudConnector.java
// public class MockCloudConnector implements CloudConnector {
// 
// 	public static final CloudConnector instance = Mockito.mock(CloudConnector.class);
// 
// 	public static void reset() {
// 		Mockito.reset(instance);
// 	}
// 
// 	public boolean isInMatchingCloud() {
// 		return instance.isInMatchingCloud();
// 	}
// 
// 	public ApplicationInstanceInfo getApplicationInstanceInfo() {
// 		return instance.getApplicationInstanceInfo();
// 	}
// 
// 	public List<ServiceInfo> getServiceInfos() {
// 		return instance.getServiceInfos();
// 	}
// }
// 
// Path: spring-cloud-services-connector-core/src/main/java/io/pivotal/spring/cloud/service/common/EurekaServiceInfo.java
// @ServiceInfo.ServiceLabel("eureka")
// public class EurekaServiceInfo extends UriBasedServiceInfo {
// 	private String clientId;
// 	private String clientSecret;
// 	private String accessTokenUri;
// 
// 	public EurekaServiceInfo(String id, String uriString, String clientId, String clientSecret, String accessTokenUri) {
// 		super(id, uriString);
// 		this.clientId = clientId;
// 		this.clientSecret = clientSecret;
// 		this.accessTokenUri = accessTokenUri;
// 	}
// 
// 	public String getClientId() {
// 		return clientId;
// 	}
// 
// 	public String getClientSecret() {
// 		return clientSecret;
// 	}
// 
// 	public String getAccessTokenUri() {
// 		return accessTokenUri;
// 	}
// 
// }
// 
// Path: spring-cloud-services-spring-connector/src/main/java/io/pivotal/spring/cloud/config/java/ServiceInfoPropertySourceAdapter.java
// public static final String SPRING_AUTOCONFIGURE_EXCLUDE = "spring.autoconfigure.exclude";


import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static io.pivotal.spring.cloud.config.java.ServiceInfoPropertySourceAdapter.SPRING_AUTOCONFIGURE_EXCLUDE;
import static org.junit.Assert.assertEquals;
import java.util.Collections;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import io.pivotal.spring.cloud.MockCloudConnector;
import io.pivotal.spring.cloud.service.common.EurekaServiceInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.env.Environment;
/*
 * Copyright 2015 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.pivotal.spring.cloud.service.eureka;






/**
 * 
 * @author Will Tran
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = EurekaServiceConnectorIntegrationTest.TestConfig.class)
public class EurekaServiceConnectorIntegrationTest {

	private static final String ACCESS_TOKEN_URI = "https://p-spring-cloud-services.uaa.my-cf.com/oauth/token";

	private static final String CLIENT_SECRET = "theClientSecret";

	private static final String CLIENT_ID = "theClientId";

	private static final String URI = "https://eureka-12345.mydomain.com";

	@Autowired
	private Environment environment;

	@BeforeClass
	public static void beforeClass() {
// Path: spring-cloud-services-spring-connector/src/test/java/io/pivotal/spring/cloud/MockCloudConnector.java
// public class MockCloudConnector implements CloudConnector {
// 
// 	public static final CloudConnector instance = Mockito.mock(CloudConnector.class);
// 
// 	public static void reset() {
// 		Mockito.reset(instance);
// 	}
// 
// 	public boolean isInMatchingCloud() {
// 		return instance.isInMatchingCloud();
// 	}
// 
// 	public ApplicationInstanceInfo getApplicationInstanceInfo() {
// 		return instance.getApplicationInstanceInfo();
// 	}
// 
// 	public List<ServiceInfo> getServiceInfos() {
// 		return instance.getServiceInfos();
// 	}
// }
// 
// Path: spring-cloud-services-connector-core/src/main/java/io/pivotal/spring/cloud/service/common/EurekaServiceInfo.java
// @ServiceInfo.ServiceLabel("eureka")
// public class EurekaServiceInfo extends UriBasedServiceInfo {
// 	private String clientId;
// 	private String clientSecret;
// 	private String accessTokenUri;
// 
// 	public EurekaServiceInfo(String id, String uriString, String clientId, String clientSecret, String accessTokenUri) {
// 		super(id, uriString);
// 		this.clientId = clientId;
// 		this.clientSecret = clientSecret;
// 		this.accessTokenUri = accessTokenUri;
// 	}
// 
// 	public String getClientId() {
// 		return clientId;
// 	}
// 
// 	public String getClientSecret() {
// 		return clientSecret;
// 	}
// 
// 	public String getAccessTokenUri() {
// 		return accessTokenUri;
// 	}
// 
// }
// 
// Path: spring-cloud-services-spring-connector/src/main/java/io/pivotal/spring/cloud/config/java/ServiceInfoPropertySourceAdapter.java
// public static final String SPRING_AUTOCONFIGURE_EXCLUDE = "spring.autoconfigure.exclude";


// Path: spring-cloud-services-spring-connector/src/test/java/io/pivotal/spring/cloud/service/eureka/EurekaServiceConnectorIntegrationTest.java
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static io.pivotal.spring.cloud.config.java.ServiceInfoPropertySourceAdapter.SPRING_AUTOCONFIGURE_EXCLUDE;
import static org.junit.Assert.assertEquals;
import java.util.Collections;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import io.pivotal.spring.cloud.MockCloudConnector;
import io.pivotal.spring.cloud.service.common.EurekaServiceInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.env.Environment;

/*
 * Copyright 2015 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.pivotal.spring.cloud.service.eureka;






/**
 * 
 * @author Will Tran
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = EurekaServiceConnectorIntegrationTest.TestConfig.class)
public class EurekaServiceConnectorIntegrationTest {

	private static final String ACCESS_TOKEN_URI = "https://p-spring-cloud-services.uaa.my-cf.com/oauth/token";

	private static final String CLIENT_SECRET = "theClientSecret";

	private static final String CLIENT_ID = "theClientId";

	private static final String URI = "https://eureka-12345.mydomain.com";

	@Autowired
	private Environment environment;

	@BeforeClass
	public static void beforeClass() {
		Mockito.when(MockCloudConnector.instance.isInMatchingCloud()).thenReturn(true);