@Test public void testWithClientDate$nonNull() { Date date = new Date(System.currentTimeMillis()-3600000); Date before=new Date(); HttpRequest build=sut().withClientDate(date).build(); Date after=new Date(); assertThat(build.clientDate(),equalTo(date)); assertDateIsInRange(before, after, build.serverDate()); verifyDefaultValues(build); }
public HttpRequestBuilder withClientDate(Date date) { this.clientDate=DateUtil.copy(date); return this; }
HttpRequestBuilder { public HttpRequestBuilder withClientDate(Date date) { this.clientDate=DateUtil.copy(date); return this; } }
HttpRequestBuilder { public HttpRequestBuilder withClientDate(Date date) { this.clientDate=DateUtil.copy(date); return this; } private  HttpRequestBuilder(); }
HttpRequestBuilder { public HttpRequestBuilder withClientDate(Date date) { this.clientDate=DateUtil.copy(date); return this; } private  HttpRequestBuilder(); HttpRequestBuilder withMethod(HttpMethod method); HttpRequestBuilder withProtocolVersion(ProtocolVersion version); HttpRequestBuilder withHost(String host); HttpRequestBuilder withAbsolutePath(String absolutePath); HttpRequestBuilder withBody(String entity); HttpRequestBuilder withHeader(String name, String rawValue); HttpRequestBuilder withServerDate(Date date); HttpRequestBuilder withClientDate(Date date); HttpRequest build(); static HttpRequestBuilder newInstance(); }
HttpRequestBuilder { public HttpRequestBuilder withClientDate(Date date) { this.clientDate=DateUtil.copy(date); return this; } private  HttpRequestBuilder(); HttpRequestBuilder withMethod(HttpMethod method); HttpRequestBuilder withProtocolVersion(ProtocolVersion version); HttpRequestBuilder withHost(String host); HttpRequestBuilder withAbsolutePath(String absolutePath); HttpRequestBuilder withBody(String entity); HttpRequestBuilder withHeader(String name, String rawValue); HttpRequestBuilder withServerDate(Date date); HttpRequestBuilder withClientDate(Date date); HttpRequest build(); static HttpRequestBuilder newInstance();  }