@Test public void testWithServerDate$nonNull() { Date date = new Date(System.currentTimeMillis()-3600000); HttpRequest build =sut().withServerDate(date).build(); assertThat(build.serverDate(),equalTo(date)); assertThat(build.clientDate(),nullValue()); verifyDefaultValues(build); }
public HttpRequestBuilder withServerDate(Date date) { this.serverDate=DateUtil.copy(date); return this; }
HttpRequestBuilder { public HttpRequestBuilder withServerDate(Date date) { this.serverDate=DateUtil.copy(date); return this; } }
HttpRequestBuilder { public HttpRequestBuilder withServerDate(Date date) { this.serverDate=DateUtil.copy(date); return this; } private  HttpRequestBuilder(); }
HttpRequestBuilder { public HttpRequestBuilder withServerDate(Date date) { this.serverDate=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 withServerDate(Date date) { this.serverDate=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();  }