### Question:
ZIPCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { ZipOutputStream zos = (ZipOutputStream) delegate; zos.flush(); zos.closeEntry(); zos.finish(); zos.close(); } ZIPCompressionOutputStream( OutputStream out, CompressionProvider provider ); @Override void close(); @Override void addEntry( String filename, String extension );  }### Answer:
@Test public void testClose() throws IOException { CompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new ZIPCompressionOutputStream( out, provider ); outStream.close(); }