### Question:
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();  }### Answer:
@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); }
@Test public void testWithClientDate$null() { Date before=new Date(); HttpRequest build=sut().withClientDate(null).build(); Date after=new Date(); assertDateIsInRange(before, after, build.serverDate()); assertThat(build.clientDate(),nullValue()); verifyDefaultValues(build); }