@Test void willExecuteAllOnBefore() { CompoundInterceptor compound = new CompoundInterceptor( Arrays.asList(t1, t2) ); compound.onRequest(request, config); verify(t1).onRequest(request, config); verify(t2).onRequest(request, config); verifyNoMoreInteractions(t1); verifyNoMoreInteractions(t2); }
@Override public void onRequest(HttpRequest<?> request, Config config) { interceptors.forEach(i -> i.onRequest(request, config)); }
CompoundInterceptor implements Interceptor { @Override public void onRequest(HttpRequest<?> request, Config config) { interceptors.forEach(i -> i.onRequest(request, config)); } }
CompoundInterceptor implements Interceptor { @Override public void onRequest(HttpRequest<?> request, Config config) { interceptors.forEach(i -> i.onRequest(request, config)); } CompoundInterceptor();   CompoundInterceptor(List<Interceptor> interceptors); }
CompoundInterceptor implements Interceptor { @Override public void onRequest(HttpRequest<?> request, Config config) { interceptors.forEach(i -> i.onRequest(request, config)); } CompoundInterceptor();   CompoundInterceptor(List<Interceptor> interceptors); @Override void onRequest(HttpRequest<?> request, Config config); @Override void onResponse(HttpResponse<?> response, HttpRequestSummary request, Config config); @Override HttpResponse<?> onFail(Exception e, HttpRequestSummary request, Config config); }
CompoundInterceptor implements Interceptor { @Override public void onRequest(HttpRequest<?> request, Config config) { interceptors.forEach(i -> i.onRequest(request, config)); } CompoundInterceptor();   CompoundInterceptor(List<Interceptor> interceptors); @Override void onRequest(HttpRequest<?> request, Config config); @Override void onResponse(HttpResponse<?> response, HttpRequestSummary request, Config config); @Override HttpResponse<?> onFail(Exception e, HttpRequestSummary request, Config config);  }