// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/model/BindingEntity.java
// @Entity
// public class BindingEntity {
// 
// 	@Id
// 	private String id;
// 	private String appGuid;
// 	private String bindingId;
// 	private String serviceInstanceId;
// 	private String drainUrl;
// 
// 	public BindingEntity() {
// 	}
// 
// 	public BindingEntity(ServiceInstanceBinding binding) {
// 		setAppGuid(binding.getAppGuid());
// 		setBindingId(binding.getId());
// 		setServiceInstanceId(binding.getServiceInstanceId());
// 		setDrainUrl(binding.getSyslogDrainUrl());
// 		this.setId(binding.getId());
// 	}
// 
// 	public String getAppGuid() {
// 		return appGuid;
// 	}
// 
// 	private void setAppGuid(String appGuid) {
// 		this.appGuid = appGuid;
// 	}
// 
// 	public String getBindingId() {
// 		return bindingId;
// 	}
// 
// 	private void setBindingId(String bindingId) {
// 		this.bindingId = bindingId;
// 	}
// 
// 	public String getServiceInstanceId() {
// 		return serviceInstanceId;
// 	}
// 
// 	private void setServiceInstanceId(String serviceInstanceId) {
// 		this.serviceInstanceId = serviceInstanceId;
// 	}
// 
// 	public String getDrainUrl() {
// 		return drainUrl;
// 	}
// 
// 	private void setDrainUrl(String drainUrl) {
// 		this.drainUrl = drainUrl;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 
// 	private void setId(String id) {
// 		this.id = id;
// 	}
// }
// 
// 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/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/service/LCServiceInstanceBindingManager.java
// public class LCServiceInstanceBindingManager {
// 
// 	@Autowired
// 	private BindingRepository repo;
// 
// 	public LCServiceInstanceBindingManager(BindingRepository repo) {
// 		this.repo = repo;
// 	}
// 
// 	public Collection<ServiceInstanceBinding> getBindings() {
// 		Collection<ServiceInstanceBinding> bindings = new ArrayList<ServiceInstanceBinding>();
// 		repo.findAll().forEach(t -> bindings.add(convert(t)));
// 		return bindings;
// 	}
// 
// 	public ServiceInstanceBinding getBinding(String bindingId) {
// 		return convert(repo.findOne(bindingId));
// 	}
// 
// 	public ServiceInstanceBinding removeBinding(String bindingId) {
// 		BindingEntity binding = repo.findOne(bindingId);
// 		if (null != binding) {
// 			repo.delete(bindingId);
// 		}
// 		return convert(binding);
// 	}
// 
// 	public void saveBinding(ServiceInstanceBinding binding) {
// 		repo.save(new BindingEntity(binding));
// 	}
// 
// 	private ServiceInstanceBinding convert(BindingEntity binding) {
// 		return null == binding ? null : new ServiceInstanceBinding(
// 				binding.getBindingId(), binding.getServiceInstanceId(), null,
// 				binding.getDrainUrl(), binding.getAppGuid());
// 	}
// }


import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import org.cloudfoundry.community.servicebroker.datalifecycle.model.BindingEntity;
import org.cloudfoundry.community.servicebroker.datalifecycle.repo.BindingRepository;
import org.cloudfoundry.community.servicebroker.datalifecycle.service.LCServiceInstanceBindingManager;
import org.cloudfoundry.community.servicebroker.model.ServiceInstanceBinding;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
package org.cloudfoundry.community.servicebroker.datalifecycle.service;




public class ServiceInstanceBindingManagerTest {

	@Mock
	BindingRepository repo;

// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/model/BindingEntity.java
// @Entity
// public class BindingEntity {
// 
// 	@Id
// 	private String id;
// 	private String appGuid;
// 	private String bindingId;
// 	private String serviceInstanceId;
// 	private String drainUrl;
// 
// 	public BindingEntity() {
// 	}
// 
// 	public BindingEntity(ServiceInstanceBinding binding) {
// 		setAppGuid(binding.getAppGuid());
// 		setBindingId(binding.getId());
// 		setServiceInstanceId(binding.getServiceInstanceId());
// 		setDrainUrl(binding.getSyslogDrainUrl());
// 		this.setId(binding.getId());
// 	}
// 
// 	public String getAppGuid() {
// 		return appGuid;
// 	}
// 
// 	private void setAppGuid(String appGuid) {
// 		this.appGuid = appGuid;
// 	}
// 
// 	public String getBindingId() {
// 		return bindingId;
// 	}
// 
// 	private void setBindingId(String bindingId) {
// 		this.bindingId = bindingId;
// 	}
// 
// 	public String getServiceInstanceId() {
// 		return serviceInstanceId;
// 	}
// 
// 	private void setServiceInstanceId(String serviceInstanceId) {
// 		this.serviceInstanceId = serviceInstanceId;
// 	}
// 
// 	public String getDrainUrl() {
// 		return drainUrl;
// 	}
// 
// 	private void setDrainUrl(String drainUrl) {
// 		this.drainUrl = drainUrl;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 
// 	private void setId(String id) {
// 		this.id = id;
// 	}
// }
// 
// 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/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/service/LCServiceInstanceBindingManager.java
// public class LCServiceInstanceBindingManager {
// 
// 	@Autowired
// 	private BindingRepository repo;
// 
// 	public LCServiceInstanceBindingManager(BindingRepository repo) {
// 		this.repo = repo;
// 	}
// 
// 	public Collection<ServiceInstanceBinding> getBindings() {
// 		Collection<ServiceInstanceBinding> bindings = new ArrayList<ServiceInstanceBinding>();
// 		repo.findAll().forEach(t -> bindings.add(convert(t)));
// 		return bindings;
// 	}
// 
// 	public ServiceInstanceBinding getBinding(String bindingId) {
// 		return convert(repo.findOne(bindingId));
// 	}
// 
// 	public ServiceInstanceBinding removeBinding(String bindingId) {
// 		BindingEntity binding = repo.findOne(bindingId);
// 		if (null != binding) {
// 			repo.delete(bindingId);
// 		}
// 		return convert(binding);
// 	}
// 
// 	public void saveBinding(ServiceInstanceBinding binding) {
// 		repo.save(new BindingEntity(binding));
// 	}
// 
// 	private ServiceInstanceBinding convert(BindingEntity binding) {
// 		return null == binding ? null : new ServiceInstanceBinding(
// 				binding.getBindingId(), binding.getServiceInstanceId(), null,
// 				binding.getDrainUrl(), binding.getAppGuid());
// 	}
// }


// Path: src/test/java/org/cloudfoundry/community/servicebroker/datalifecycle/service/ServiceInstanceBindingManagerTest.java
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import org.cloudfoundry.community.servicebroker.datalifecycle.model.BindingEntity;
import org.cloudfoundry.community.servicebroker.datalifecycle.repo.BindingRepository;
import org.cloudfoundry.community.servicebroker.datalifecycle.service.LCServiceInstanceBindingManager;
import org.cloudfoundry.community.servicebroker.model.ServiceInstanceBinding;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

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




public class ServiceInstanceBindingManagerTest {

	@Mock
	BindingRepository repo;

	private LCServiceInstanceBindingManager bindingManager;