@Test public void addHeaderShouldSetItIntoHttpUrlConnection() throws IOException { toTest.addHeader("name", "value"); verify(httpURLConnection).addRequestProperty("name", "value"); }
public void addHeader(String name, String value) throws IOException { con.addRequestProperty(name, value); }
HttpURLConnectionHttpChannel implements HttpChannel { public void addHeader(String name, String value) throws IOException { con.addRequestProperty(name, value); } }
HttpURLConnectionHttpChannel implements HttpChannel { public void addHeader(String name, String value) throws IOException { con.addRequestProperty(name, value); } HttpURLConnectionHttpChannel(HttpURLConnection con, MethodType methodType); }
HttpURLConnectionHttpChannel implements HttpChannel { public void addHeader(String name, String value) throws IOException { con.addRequestProperty(name, value); } HttpURLConnectionHttpChannel(HttpURLConnection con, MethodType methodType); void setSocketTimeout(int timeout); void setConnectionTimeout(int timeout); void setHeader(String name, String value); void addHeader(String name, String value); void setContentType(String value); void setAccept(String value); void writeEntityWith(HttpEntityWriter httpEntityWriter); Response send(); }
HttpURLConnectionHttpChannel implements HttpChannel { public void addHeader(String name, String value) throws IOException { con.addRequestProperty(name, value); } HttpURLConnectionHttpChannel(HttpURLConnection con, MethodType methodType); void setSocketTimeout(int timeout); void setConnectionTimeout(int timeout); void setHeader(String name, String value); void addHeader(String name, String value); void setContentType(String value); void setAccept(String value); void writeEntityWith(HttpEntityWriter httpEntityWriter); Response send();  }