@Test public void contextModification() { final HttpRequest.Builder b = new HttpRequest.Builder(this.method, this.uri, Operation.WRITE) .withContext("key1", "value1"); final HttpRequest request = b.build(); b.withContext("key2", "value2"); assertThat(request.getContext(), hasEntry("key1", "value1")); assertThat(request.getContext(), not(hasEntry("key2", "value2"))); }
@Override public Map<String, String> getContext() { return this.context; }
HttpRequest implements Request { @Override public Map<String, String> getContext() { return this.context; } }
HttpRequest implements Request { @Override public Map<String, String> getContext() { return this.context; } private  HttpRequest(final Builder builder); }
HttpRequest implements Request { @Override public Map<String, String> getContext() { return this.context; } 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> getContext() { return this.context; } 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();  }