// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/config/LCCatalogConfig.java
// public static String COPY = "copy";
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/DataLifecycleServiceBrokerApplication.java
// @SpringBootApplication
// public class DataLifecycleServiceBrokerApplication {
// 
// 	public static void main(String[] args) {
// 		SpringApplication
// 				.run(DataLifecycleServiceBrokerApplication.class, args);
// 	}
// }
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/repo/BindingRepository.java
// @RepositoryRestResource(collectionResourceRel = "bindings", path = "bindings")
// public interface BindingRepository extends
// 		PagingAndSortingRepository<BindingEntity, String> {
// 
// }


import static com.jayway.restassured.RestAssured.given;
import static org.cloudfoundry.community.servicebroker.datalifecycle.config.LCCatalogConfig.COPY;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.notNullValue;
import java.sql.SQLException;
import java.util.Date;
import net.minidev.json.JSONObject;
import org.apache.http.entity.ContentType;
import org.cloudfoundry.community.servicebroker.datalifecycle.DataLifecycleServiceBrokerApplication;
import org.cloudfoundry.community.servicebroker.datalifecycle.repo.BindingRepository;
import org.cloudfoundry.community.servicebroker.model.ServiceInstance;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.http.HttpStatus;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import com.amazonaws.services.ec2.AmazonEC2Client;
import com.amazonaws.util.json.JSONException;
import com.jayway.restassured.RestAssured;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.response.Response;
import com.jayway.restassured.specification.RequestSpecification;
package org.cloudfoundry.community.servicebroker.datalifecycle.servicebinding;






@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = DataLifecycleServiceBrokerApplication.class)
@WebAppConfiguration
@IntegrationTest("server.port:0")
@Category(IntegrationTest.class)
/**
 * These tests assume an empty VPC with one instance (the prod one) running. 
 * You can set env variables to effect where and how the ec2Client behaves, 
 * see README.md in the project root
 *
 */
public class BrokerIntegrationTest {

	// TODO DRY w/ Catalog test
	@Value("${local.server.port}")
	private int port;

	@Value("#{environment.SECURITY_USER_NAME}")
	private String username;

	@Value("#{environment.SECURITY_USER_PASSWORD}")
	private String password;

	@Autowired
	private AmazonEC2Client ec2Client;

	@Value("#{environment.SOURCE_INSTANCE_ID}")
	private String sourceInstanceId;

	@Autowired
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/config/LCCatalogConfig.java
// public static String COPY = "copy";
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/DataLifecycleServiceBrokerApplication.java
// @SpringBootApplication
// public class DataLifecycleServiceBrokerApplication {
// 
// 	public static void main(String[] args) {
// 		SpringApplication
// 				.run(DataLifecycleServiceBrokerApplication.class, args);
// 	}
// }
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/repo/BindingRepository.java
// @RepositoryRestResource(collectionResourceRel = "bindings", path = "bindings")
// public interface BindingRepository extends
// 		PagingAndSortingRepository<BindingEntity, String> {
// 
// }


// Path: src/test/java/org/cloudfoundry/community/servicebroker/datalifecycle/servicebinding/BrokerIntegrationTest.java
import static com.jayway.restassured.RestAssured.given;
import static org.cloudfoundry.community.servicebroker.datalifecycle.config.LCCatalogConfig.COPY;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.notNullValue;
import java.sql.SQLException;
import java.util.Date;
import net.minidev.json.JSONObject;
import org.apache.http.entity.ContentType;
import org.cloudfoundry.community.servicebroker.datalifecycle.DataLifecycleServiceBrokerApplication;
import org.cloudfoundry.community.servicebroker.datalifecycle.repo.BindingRepository;
import org.cloudfoundry.community.servicebroker.model.ServiceInstance;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.http.HttpStatus;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import com.amazonaws.services.ec2.AmazonEC2Client;
import com.amazonaws.util.json.JSONException;
import com.jayway.restassured.RestAssured;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.response.Response;
import com.jayway.restassured.specification.RequestSpecification;

package org.cloudfoundry.community.servicebroker.datalifecycle.servicebinding;






@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = DataLifecycleServiceBrokerApplication.class)
@WebAppConfiguration
@IntegrationTest("server.port:0")
@Category(IntegrationTest.class)
/**
 * These tests assume an empty VPC with one instance (the prod one) running. 
 * You can set env variables to effect where and how the ec2Client behaves, 
 * see README.md in the project root
 *
 */
public class BrokerIntegrationTest {

	// TODO DRY w/ Catalog test
	@Value("${local.server.port}")
	private int port;

	@Value("#{environment.SECURITY_USER_NAME}")
	private String username;

	@Value("#{environment.SECURITY_USER_PASSWORD}")
	private String password;

	@Autowired
	private AmazonEC2Client ec2Client;

	@Value("#{environment.SOURCE_INSTANCE_ID}")
	private String sourceInstanceId;

	@Autowired
	private BindingRepository bindingRepo;