### Question:
Response implements Closeable { public InputStream getBody() throws IOException { return httpResponse.getContent(); } Response(HttpResponse httpResponse); int getStatusCode(); List<String> getHeader(String headerName); long getContentLength(); InputStream getBody(); GenericUrl getRequestUrl(); @Override void close();  }### Answer:
@Test public void testGetContent() throws IOException { byte[] expectedResponse = "crepecake\nis\ngood!".getBytes(StandardCharsets.UTF_8); ByteArrayInputStream responseInputStream = new ByteArrayInputStream(expectedResponse); Mockito.when(httpResponseMock.getContent()).thenReturn(responseInputStream); try (Response response = new Response(httpResponseMock)) { Assert.assertArrayEquals(expectedResponse, ByteStreams.toByteArray(response.getBody())); } }