AuthorizationHttpChannel implements HttpChannel { public void addHeader(String name, String value) throws IOException { this.delegate.addHeader(name, value); } AuthorizationHttpChannel(HttpChannel delegate, Authorization authorization, MethodType methodType, String url, Charset charset, Map<String, EntityParamExtractor> entityParamExtrators); Response send(); void setContentType(String contentType); void writeEntityWith(HttpEntityWriter httpEntityWriter); void addHeader(String name, String value); void setHeader(String name, String value); void setAccept(String value); void setSocketTimeout(int timeout); void setConnectionTimeout(int timeout);  }
@Test public void addHeaderShouldDelegate() throws IOException { toTest.addHeader("name", "value"); verify(delegate).addHeader("name", "value"); }