// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionException.java
// public class ServiceBrokerApiVersionException extends RuntimeException {
// 
// 	private static final long serialVersionUID = -6792404679608443775L;
// 
// 	public ServiceBrokerApiVersionException(String expectedVersion, String providedVersion) {
// 		super("The provided service broker API version is not supported: "
// 				+ "expected version=" + expectedVersion
// 				+ ", provided version = " + providedVersion);
// 	}
// 	
// }
// 
// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/model/BrokerApiVersion.java
// @Getter
// @ToString
// @EqualsAndHashCode
// public class BrokerApiVersion {
// 
// 	public final static String DEFAULT_API_VERSION_HEADER = "X-Broker-Api-Version";
// 	public final static String API_VERSION_ANY = "*";
// 	public final static String API_VERSION_CURRENT = "2.8";
// 
// 	/**
// 	 * The name of the HTTP header field expected to contain the API version of the service broker client.
// 	 */
// 	private final String brokerApiVersionHeader;
// 
// 	/**
// 	 * The version of the broker API supported by the broker. A value of <code>null</code> or
// 	 * <code>API_VERSION_ANY</code> will disable API version validation.
// 	 */
// 	private final String apiVersion;
// 
// 	public BrokerApiVersion(String brokerApiVersionHeader, String apiVersion) {
// 		this.brokerApiVersionHeader = brokerApiVersionHeader;
// 		this.apiVersion = apiVersion;
// 	}
// 
// 	public BrokerApiVersion(String apiVersion) {
// 		this(DEFAULT_API_VERSION_HEADER, apiVersion);
// 	}
// 
// 	public BrokerApiVersion() {
// 		this(DEFAULT_API_VERSION_HEADER, API_VERSION_ANY);
// 	}
// }


import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.cloud.servicebroker.exception.ServiceBrokerApiVersionException;
import org.springframework.cloud.servicebroker.model.BrokerApiVersion;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
package org.springframework.cloud.servicebroker.interceptor;





public class BrokerApiVersionInterceptorTest {

	@Mock
	private HttpServletRequest request;
	
	@Mock 
	private HttpServletResponse response;
	
	@Mock
	private BrokerApiVersion brokerApiVersion;

	@Before
// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/exception/ServiceBrokerApiVersionException.java
// public class ServiceBrokerApiVersionException extends RuntimeException {
// 
// 	private static final long serialVersionUID = -6792404679608443775L;
// 
// 	public ServiceBrokerApiVersionException(String expectedVersion, String providedVersion) {
// 		super("The provided service broker API version is not supported: "
// 				+ "expected version=" + expectedVersion
// 				+ ", provided version = " + providedVersion);
// 	}
// 	
// }
// 
// Path: src/spring-cloud-cloudfoundry-service-broker/src/main/java/org/springframework/cloud/servicebroker/model/BrokerApiVersion.java
// @Getter
// @ToString
// @EqualsAndHashCode
// public class BrokerApiVersion {
// 
// 	public final static String DEFAULT_API_VERSION_HEADER = "X-Broker-Api-Version";
// 	public final static String API_VERSION_ANY = "*";
// 	public final static String API_VERSION_CURRENT = "2.8";
// 
// 	/**
// 	 * The name of the HTTP header field expected to contain the API version of the service broker client.
// 	 */
// 	private final String brokerApiVersionHeader;
// 
// 	/**
// 	 * The version of the broker API supported by the broker. A value of <code>null</code> or
// 	 * <code>API_VERSION_ANY</code> will disable API version validation.
// 	 */
// 	private final String apiVersion;
// 
// 	public BrokerApiVersion(String brokerApiVersionHeader, String apiVersion) {
// 		this.brokerApiVersionHeader = brokerApiVersionHeader;
// 		this.apiVersion = apiVersion;
// 	}
// 
// 	public BrokerApiVersion(String apiVersion) {
// 		this(DEFAULT_API_VERSION_HEADER, apiVersion);
// 	}
// 
// 	public BrokerApiVersion() {
// 		this(DEFAULT_API_VERSION_HEADER, API_VERSION_ANY);
// 	}
// }


// Path: src/spring-cloud-cloudfoundry-service-broker/src/test/java/org/springframework/cloud/servicebroker/interceptor/BrokerApiVersionInterceptorTest.java
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.cloud.servicebroker.exception.ServiceBrokerApiVersionException;
import org.springframework.cloud.servicebroker.model.BrokerApiVersion;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

package org.springframework.cloud.servicebroker.interceptor;





public class BrokerApiVersionInterceptorTest {

	@Mock
	private HttpServletRequest request;
	
	@Mock 
	private HttpServletResponse response;
	
	@Mock
	private BrokerApiVersion brokerApiVersion;

	@Before
	public void setup() {