CompoundInterceptor implements Interceptor { @Override public void onResponse(HttpResponse<?> response, HttpRequestSummary request, Config config) { interceptors.forEach(i -> i.onResponse(response, 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);  }
@Test void willExecuteAllOnAfter() { CompoundInterceptor compound = new CompoundInterceptor( Arrays.asList(t1, t2) ); compound.onResponse(response, summary, config); verify(t1).onResponse(response, summary, config); verify(t2).onResponse(response, summary, config); verifyNoMoreInteractions(t1); verifyNoMoreInteractions(t2); }