@Test public void authorityIsDelegated() { ClientInterceptor interceptor = new ClientInterceptor() { @Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall( MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) { return next.newCall(method, callOptions); } }; when(channel.authority()).thenReturn("auth"); Channel intercepted = ClientInterceptors.intercept(channel, interceptor); assertEquals("auth", intercepted.authority()); }
public static Channel intercept(Channel channel, ClientInterceptor... interceptors) { return intercept(channel, Arrays.asList(interceptors)); }
ClientInterceptors { public static Channel intercept(Channel channel, ClientInterceptor... interceptors) { return intercept(channel, Arrays.asList(interceptors)); } }
ClientInterceptors { public static Channel intercept(Channel channel, ClientInterceptor... interceptors) { return intercept(channel, Arrays.asList(interceptors)); } private  ClientInterceptors(); }
ClientInterceptors { public static Channel intercept(Channel channel, ClientInterceptor... interceptors) { return intercept(channel, Arrays.asList(interceptors)); } private  ClientInterceptors(); static Channel interceptForward(Channel channel, ClientInterceptor... interceptors); static Channel interceptForward(Channel channel,
                                         List<? extends ClientInterceptor> interceptors); static Channel intercept(Channel channel, ClientInterceptor... interceptors); static Channel intercept(Channel channel, List<? extends ClientInterceptor> interceptors); }
ClientInterceptors { public static Channel intercept(Channel channel, ClientInterceptor... interceptors) { return intercept(channel, Arrays.asList(interceptors)); } private  ClientInterceptors(); static Channel interceptForward(Channel channel, ClientInterceptor... interceptors); static Channel interceptForward(Channel channel,
                                         List<? extends ClientInterceptor> interceptors); static Channel intercept(Channel channel, ClientInterceptor... interceptors); static Channel intercept(Channel channel, List<? extends ClientInterceptor> interceptors);  }