### Question:
GzipCompressor implements Compressor { @Override public byte[] compress(byte[] uncompressed) { byte[] returnBuffer; try (ByteArrayOutputStream bos = new ByteArrayOutputStream(uncompressed.length); GZIPOutputStream gzipOutputStream = new GZIPOutputStream(bos)) { gzipOutputStream.write(uncompressed); gzipOutputStream.close(); returnBuffer = bos.toByteArray(); bos.close(); return returnBuffer; } catch (Exception e) { throw new IllegalStateException("could not compress gzip", e); } } GzipCompressor(); @Override byte[] decompress(byte[] compressed); @Override byte[] compress(byte[] uncompressed);  }### Answer:
@Test public void compress() throws Exception { byte[] original = Bytes.random(128).append(Bytes.allocate(1024)).transform(BytesTransformers.shuffle()).array(); byte[] compressed = compressor.compress(original); assertTrue(compressed.length < original.length); }