@Test public void testWithServerDate$null() { Date before=new Date(); HttpRequest build=sut().withServerDate(null).build(); Date after=new Date(); assertDateIsInRange(before, after, build.serverDate()); 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();  }