use of io.apiman.gateway.engine.util.PassthroughDataPolicy in project apiman by apiman.
the class DataPolicyChainTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
policies = new ArrayList<>();
policyOne = spy(new PassthroughDataPolicy("1"));
pwcOne = new PolicyWithConfiguration(policyOne, configuration);
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");
mockRequestHandler = mock(IReadWriteStream.class);
mockResponseHandler = mock(IReadWriteStream.class);
mockBodyHandler = mock(IAsyncHandler.class);
mockEndHandler = mock(IAsyncHandler.class);
}
Aggregations