@Test public void testProcessShouldCallAllResponseInterceptors() throws ApplicationException { Map<String, StubDescriptor> stubDescriptors = new LinkedHashMap<>(); stubDescriptors.put("test", createStubDescriptor()); given(routingService.getStubDescriptors()).willReturn(stubDescriptors); WilmaHttpEntity entity = new WilmaHttpRequest(); underTest.process(entity); BDDMockito.verify(requestInterceptor).onRequestReceive((WilmaHttpRequest) entity, PARAMS); }
@Override public void process(final WilmaHttpEntity entity) throws ApplicationException { Map<String, StubDescriptor> stubDescriptors = routingService.getStubDescriptors(); for (String groupName : stubDescriptors.keySet()) { StubDescriptor stubDescriptor = stubDescriptors.get(groupName); List<InterceptorDescriptor> interceptorDescriptors = stubDescriptor.getInterceptorDescriptors(); for (InterceptorDescriptor interceptorDescriptor : interceptorDescriptors) { RequestInterceptor interceptor = interceptorDescriptor.getRequestInterceptor(); callInterceptor(interceptor, entity, interceptorDescriptor); } } }
RequestInterceptorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { Map<String, StubDescriptor> stubDescriptors = routingService.getStubDescriptors(); for (String groupName : stubDescriptors.keySet()) { StubDescriptor stubDescriptor = stubDescriptors.get(groupName); List<InterceptorDescriptor> interceptorDescriptors = stubDescriptor.getInterceptorDescriptors(); for (InterceptorDescriptor interceptorDescriptor : interceptorDescriptors) { RequestInterceptor interceptor = interceptorDescriptor.getRequestInterceptor(); callInterceptor(interceptor, entity, interceptorDescriptor); } } } }
RequestInterceptorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { Map<String, StubDescriptor> stubDescriptors = routingService.getStubDescriptors(); for (String groupName : stubDescriptors.keySet()) { StubDescriptor stubDescriptor = stubDescriptors.get(groupName); List<InterceptorDescriptor> interceptorDescriptors = stubDescriptor.getInterceptorDescriptors(); for (InterceptorDescriptor interceptorDescriptor : interceptorDescriptors) { RequestInterceptor interceptor = interceptorDescriptor.getRequestInterceptor(); callInterceptor(interceptor, entity, interceptorDescriptor); } } }  }
RequestInterceptorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { Map<String, StubDescriptor> stubDescriptors = routingService.getStubDescriptors(); for (String groupName : stubDescriptors.keySet()) { StubDescriptor stubDescriptor = stubDescriptors.get(groupName); List<InterceptorDescriptor> interceptorDescriptors = stubDescriptor.getInterceptorDescriptors(); for (InterceptorDescriptor interceptorDescriptor : interceptorDescriptors) { RequestInterceptor interceptor = interceptorDescriptor.getRequestInterceptor(); callInterceptor(interceptor, entity, interceptorDescriptor); } } }  @Override void process(final WilmaHttpEntity entity); }
RequestInterceptorProcessor extends ProcessorBase { @Override public void process(final WilmaHttpEntity entity) throws ApplicationException { Map<String, StubDescriptor> stubDescriptors = routingService.getStubDescriptors(); for (String groupName : stubDescriptors.keySet()) { StubDescriptor stubDescriptor = stubDescriptors.get(groupName); List<InterceptorDescriptor> interceptorDescriptors = stubDescriptor.getInterceptorDescriptors(); for (InterceptorDescriptor interceptorDescriptor : interceptorDescriptors) { RequestInterceptor interceptor = interceptorDescriptor.getRequestInterceptor(); callInterceptor(interceptor, entity, interceptorDescriptor); } } }  @Override void process(final WilmaHttpEntity entity);  }