assertTrue(expected + "\nis not a prefix of:\n" + result, result.startsWith(expected));
}
@Test
public void testDescribeRequestAndResponseF() throws Exception {
HTTPRequest request = new HTTPRequest(new URL("http://ping/pong"));
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://ping/pong\nk1: v1\nk2: v2\n\n"