### Question:
S3StringResponseHandler extends AbstractS3ResponseHandler<String> { @Override public AmazonWebServiceResponse<String> handle(HttpResponse response) throws Exception { AmazonWebServiceResponse<String> awsResponse = parseResponseMetadata(response); int bytesRead; byte[] buffer = new byte[DEFAULT_BYTE_SIZE]; StringBuilder builder = new StringBuilder(); InputStream content = response.getContent(); while ((bytesRead = content.read(buffer)) > 0) { builder.append(new String(buffer, 0, bytesRead, StringUtils.UTF8)); } awsResponse.setResult(builder.toString()); return awsResponse; }  @Override AmazonWebServiceResponse<String> handle(HttpResponse response);  }### Answer:
@Test public void testHandle() throws Exception { S3StringResponseHandler handler = new S3StringResponseHandler(); ByteArrayInputStream bais = new ByteArrayInputStream("content".getBytes(StringUtils.UTF8)); HttpResponse response = new HttpResponse.Builder().content(bais).build(); AmazonWebServiceResponse<String> awsr = handler.handle(response); assertEquals(awsr.getResult(), "content"); }