### Question:
HttpResponseBuilder extends MutableContent { public HttpResponseBuilder setEncoding(Charset charset) { Collection<String> values = headers.get("Content-Type"); if (!values.isEmpty()) { String contentType = values.iterator().next(); StringBuilder newContentTypeBuilder = new StringBuilder(""); String[] parts = StringUtils.split(contentType, ';'); for (String part : parts) { if (!part.contains("charset=")) { if (newContentTypeBuilder.length() > 0) { newContentTypeBuilder.append("; "); } newContentTypeBuilder.append(part); } } if (charset != null) { if (newContentTypeBuilder.length() > 0) { newContentTypeBuilder.append("; "); } newContentTypeBuilder.append("charset=").append(charset.name()); } values.clear(); String newContentType = newContentTypeBuilder.toString(); values.add(newContentType); if (!(values.size() == 1 && !contentType.equals(newContentType))) { incrementNumChanges(); } } return this; } HttpResponseBuilder(GadgetHtmlParser parser, HttpResponse response);  HttpResponseBuilder();  HttpResponseBuilder(HttpResponseBuilder builder);  HttpResponseBuilder(HttpResponse response); HttpResponse create(); HttpResponseBuilder setResponseString(String body); HttpResponseBuilder setEncoding(Charset charset); HttpResponseBuilder setResponse(byte[] responseBytes); HttpResponseBuilder setResponseNoCopy(byte[] responseBytes); HttpResponseBuilder setHttpStatusCode(int httpStatusCode); HttpResponseBuilder clearAllHeaders(); HttpResponseBuilder addHeader(String name, String value); HttpResponseBuilder setHeader(String name, String value); String getHeader(String name); HttpResponseBuilder addHeaders(Map<String, String> headers); HttpResponseBuilder addAllHeaders(Map<String, ? extends List<String>> headers); HttpResponseBuilder addAllHeaders(Multimap<String, String> headers); Collection<String> removeHeader(String name); HttpResponseBuilder setCacheTtl(int cacheTtl); HttpResponseBuilder setExpirationTime(long expirationTime); HttpResponseBuilder setRefetchStrictNoCacheAfterMs(long refetchStrictNoCacheAfterMs); HttpResponseBuilder setCacheControlMaxAge(long expirationTime); HttpResponseBuilder setStrictNoCache(); HttpResponseBuilder setMetadata(String key, String value); HttpResponseBuilder setMetadata(Map<String, String> metadata); int getContentLength(); int getHttpStatusCode(); long getRefetchStrictNoCacheAfterMs();  }### Answer:
@Test public void setEncoding() { HttpResponseBuilder builder = new HttpResponseBuilder() .addHeader("Content-Type", "text/html; charset=Big5") .setEncoding(Charsets.UTF_8); Multimap<String, String> headers = builder.getHeaders(); assertEquals("text/html; charset=UTF-8", headers.get("Content-Type").iterator().next()); }