@Test public void multipleHeaders() { final HttpResponse.Builder b = new HttpResponse.Builder().withStatusCode(this.statusCode); for (int i = 0; i < 10; i++) { b.withHeader("key" + (10 - i), "value"); } final HttpResponse response = b.build(); assertThat(response.headers().size(), is(10)); for (int i = 0; i < 10; i++) { assertThat(response.headers(), hasEntry("key" + (10 - i), "value")); } }
@Override public Map<String, String> headers() { return this.responseHeaders; }
HttpResponse implements Response { @Override public Map<String, String> headers() { return this.responseHeaders; } }
HttpResponse implements Response { @Override public Map<String, String> headers() { return this.responseHeaders; } private  HttpResponse(final Builder builder); }
HttpResponse implements Response { @Override public Map<String, String> headers() { return this.responseHeaders; } private  HttpResponse(final Builder builder); @Override int getStatusCode(); @Override Map<String, String> headers(); @Override Body getBody(); @Override Map<String, String> getContext(); @Override RequestTimestamps getRequestTimestamps(); @Override String toString(); }
HttpResponse implements Response { @Override public Map<String, String> headers() { return this.responseHeaders; } private  HttpResponse(final Builder builder); @Override int getStatusCode(); @Override Map<String, String> headers(); @Override Body getBody(); @Override Map<String, String> getContext(); @Override RequestTimestamps getRequestTimestamps(); @Override String toString();  }