### Question:
LiveHttpResponse implements LiveHttpMessage { public static Builder response() { return new Builder(); } LiveHttpResponse(Builder builder); static Builder response(); static Builder response(HttpResponseStatus status); static Builder response(HttpResponseStatus status, ByteStream body); @Override HttpHeaders headers(); @Override ByteStream body(); @Override HttpVersion version(); Transformer newBuilder(); HttpResponseStatus status(); boolean isRedirect(); Eventual<HttpResponse> aggregate(int maxContentBytes); Set<ResponseCookie> cookies(); Optional<ResponseCookie> cookie(String name); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void supportsCaseInsensitiveHeaderNames() { LiveHttpResponse response = response(OK).header("Content-Type", "text/plain").build(); assertThat(response.header("content-type"), isValue("text/plain")); }
@Test public void headerValuesAreCaseSensitive() { LiveHttpResponse response = response(OK).header("Content-Type", "TEXT/PLAIN").build(); assertThat(response.header("content-type"), not(isValue("text/plain"))); }
@Test public void shouldCreateAChunkedResponse() { assertThat(response().build().chunked(), is(false)); assertThat(response().setChunked().build().chunked(), is(true)); }
@Test public void rejectsMultipleContentLengthInSingleHeader() { assertThrows(IllegalArgumentException.class, () -> response() .addHeader(CONTENT_LENGTH, "15, 16") .ensureContentLengthIsValid() .build()); }
@Test public void rejectsMultipleContentLength() { assertThrows(IllegalArgumentException.class, () -> response() .addHeader(CONTENT_LENGTH, "15") .addHeader(CONTENT_LENGTH, "16") .ensureContentLengthIsValid() .build()); }
@Test public void rejectsInvalidContentLength() { assertThrows(IllegalArgumentException.class, () -> response() .addHeader(CONTENT_LENGTH, "foo") .ensureContentLengthIsValid() .build()); }
@Test public void ensuresContentLengthIsPositive() { Exception e = assertThrows(IllegalArgumentException.class, () -> response(OK) .header("Content-Length", -3) .build()); assertEquals("Invalid Content-Length found. -3", e.getMessage()); }