### Question:
SnappyCompressionOutputStream extends CompressionOutputStream { @Override public void close() throws IOException { SnappyOutputStream zos = (SnappyOutputStream) delegate; zos.flush(); zos.close(); } SnappyCompressionOutputStream( OutputStream out, ICompressionProvider provider ); @Override void close(); @Override void write( int b );  }### Answer:
@Test public void testClose() throws IOException { ICompressionProvider provider = outStream.getCompressionProvider(); ByteArrayOutputStream out = new ByteArrayOutputStream(); outStream = new SnappyCompressionOutputStream( out, provider ); outStream.close(); }