### Question:
URLFetchUtils { static String describeRequestAndResponse(HTTPRequestInfo req, HttpResponseException resp) { StringBuilder b = new StringBuilder(256).append("Request: "); req.appendToString(b); b.append("\nResponse: "); appendResponse(resp, b); return b.toString(); } private  URLFetchUtils();   }### Answer:
@Test public void testDescribeRequestAndResponseF() throws Exception { HTTPRequest request = new HTTPRequest(new URL("http: request.setPayload("hello".getBytes()); request.addHeader(new HTTPHeader("k1", "v1")); request.addHeader(new HTTPHeader("k2", "v2")); HTTPResponse response = mock(HTTPResponse.class); when(response.getHeadersUncombined()).thenReturn(ImmutableList.of(new HTTPHeader("k3", "v3"))); when(response.getResponseCode()).thenReturn(500); when(response.getContent()).thenReturn("bla".getBytes()); String expected = "Request: GET http: + "5 bytes of content\n\nResponse: 500 with 3 bytes of content\nk3: v3\nbla\n"; String result = URLFetchUtils.describeRequestAndResponse(new HTTPRequestInfo(request), response); assertEquals(expected, result); }