@Test public void interceptorResponse_AnyResponseBuilder_ShouldApplyAllRegisteredInterceptors() { Request request = mock(Request.class); ResponseInterceptorContext response = mock(ResponseInterceptorContext.class); engine.interceptResponse(request, response); verify(responseInterceptor).intercept(request, response); }
public void interceptResponse(Request request, ResponseInterceptorContext response) { for (ResponseInterceptor interceptor : interceptorManager.getResponseInterceptors()) { interceptor.intercept(request, response); } }
InterceptorEngine { public void interceptResponse(Request request, ResponseInterceptorContext response) { for (ResponseInterceptor interceptor : interceptorManager.getResponseInterceptors()) { interceptor.intercept(request, response); } } }
InterceptorEngine { public void interceptResponse(Request request, ResponseInterceptorContext response) { for (ResponseInterceptor interceptor : interceptorManager.getResponseInterceptors()) { interceptor.intercept(request, response); } } InterceptorEngine(InterceptorManagerImpl interceptorManager); }
InterceptorEngine { public void interceptResponse(Request request, ResponseInterceptorContext response) { for (ResponseInterceptor interceptor : interceptorManager.getResponseInterceptors()) { interceptor.intercept(request, response); } } InterceptorEngine(InterceptorManagerImpl interceptorManager); void interceptRequest(RequestInterceptorContext request); void interceptResponse(Request request, ResponseInterceptorContext response); }
InterceptorEngine { public void interceptResponse(Request request, ResponseInterceptorContext response) { for (ResponseInterceptor interceptor : interceptorManager.getResponseInterceptors()) { interceptor.intercept(request, response); } } InterceptorEngine(InterceptorManagerImpl interceptorManager); void interceptRequest(RequestInterceptorContext request); void interceptResponse(Request request, ResponseInterceptorContext response);  }