### Question:
DecompressingEntity extends HttpEntityWrapper { @Override public void writeTo(final OutputStream outStream) throws IOException { Args.notNull(outStream, "Output stream"); try (InputStream inStream = getContent()) { final byte[] buffer = new byte[BUFFER_SIZE]; int l; while ((l = inStream.read(buffer)) != -1) { outStream.write(buffer, 0, l); } } } DecompressingEntity(
            final HttpEntity wrapped,
            final InputStreamFactory inputStreamFactory); @Override InputStream getContent(); @Override void writeTo(final OutputStream outStream); @Override String getContentEncoding(); @Override long getContentLength();  }### Answer:
@Test public void testWriteToStream() throws Exception { final CRC32 crc32 = new CRC32(); final StringEntity wrapped = new StringEntity("1234567890", StandardCharsets.US_ASCII); final ChecksumEntity entity = new ChecksumEntity(wrapped, crc32); Assert.assertFalse(entity.isStreaming()); final ByteArrayOutputStream out = new ByteArrayOutputStream(); entity.writeTo(out); final String s = new String(out.toByteArray(), StandardCharsets.US_ASCII); Assert.assertEquals("1234567890", s); Assert.assertEquals(639479525L, crc32.getValue()); }