@Test public void multipleHeaders() { final HttpRequest.Builder b = new HttpRequest.Builder(this.method, this.uri, this.operation); for (int i = 0; i < 10; i++) { b.withHeader("key" + (10 - i), "value"); } final HttpRequest request = b.build(); assertThat(request.headers().size(), is(10)); for (int i = 0; i < 10; i++) { assertThat(request.headers(), hasEntry("key" + (10 - i), "value")); } }
@Override public Map<String, String> headers() { return this.requestHeaders; }
HttpRequest implements Request { @Override public Map<String, String> headers() { return this.requestHeaders; } }
HttpRequest implements Request { @Override public Map<String, String> headers() { return this.requestHeaders; } private  HttpRequest(final Builder builder); }
HttpRequest implements Request { @Override public Map<String, String> headers() { return this.requestHeaders; } private  HttpRequest(final Builder builder); @Override Method getMethod(); @Override URI getUri(); @Override Map<String, List<String>> getQueryParameters(); @Override Map<String, String> headers(); @Override Body getBody(); @Override Map<String, String> getContext(); @Override Operation getOperation(); @Override String toString(); }
HttpRequest implements Request { @Override public Map<String, String> headers() { return this.requestHeaders; } private  HttpRequest(final Builder builder); @Override Method getMethod(); @Override URI getUri(); @Override Map<String, List<String>> getQueryParameters(); @Override Map<String, String> headers(); @Override Body getBody(); @Override Map<String, String> getContext(); @Override Operation getOperation(); @Override String toString();  }