### Question:
GzipContentProvider implements ContentProvider { @Override public void writeContent(OutputStream output) throws FileDownloadException { try { GZIPOutputStream gzipOutput = getGZIPOutputStream(output); contentProvider.writeContent(gzipOutput); gzipOutput.finish(); } catch (IOException e) { throw new GzipPackingException(e); } } GzipContentProvider(ContentProvider contentProvider); @Override void writeContent(OutputStream output); @Override String getMimeContentType(); @Override String getContentFileNameExt();  }### Answer:
@Test public void afterUncompressingMatchesOriginalString() throws Exception { ByteArrayOutputStream output = new ByteArrayOutputStream(); sut.writeContent(output); BufferedReader in2 = new BufferedReader(new InputStreamReader(new GZIPInputStream( new ByteArrayInputStream(output.toByteArray())))); String contentAfterUngzipping = in2.readLine(); in2.close(); assertEquals(contentAfterUngzipping, getContentExample()); }