use of io.apiman.gateway.engine.util.PassthroughPolicy in project apiman by apiman.
the class PolicyChainTest method setup.
@Before
public void setup() {
policies = new ArrayList<>();
policyOne = spy(new PassthroughPolicy("1"));
policyTwo = spy(new PassthroughPolicy("2"));
pwcOne = new PolicyWithConfiguration(policyOne, new Object());
pwcTwo = new PolicyWithConfiguration(policyTwo, new Object());
// mockChain = mock(IPolicyChain.class);
mockContext = mock(IPolicyContext.class);
mockRequest = mock(ApiRequest.class);
given(mockRequest.getApiKey()).willReturn("bacon");
given(mockRequest.getDestination()).willReturn("mars");
given(mockRequest.getType()).willReturn("request");
mockResponse = mock(ApiResponse.class);
given(mockRequest.getApiKey()).willReturn("bacon");
given(mockRequest.getDestination()).willReturn("mars");
given(mockRequest.getType()).willReturn("response");
mockBuffer = mock(IApimanBuffer.class);
given(mockBuffer.toString()).willReturn("bananas");
mockBodyHandler = mock(IAsyncHandler.class);
mockEndHandler = mock(IAsyncHandler.class);
}
Aggregations