@Test(groups = TestGroup.UNIT) public void roundTrip() throws IOException { InputStream source1 = new ByteArrayInputStream(s_json.getBytes()); ByteArrayOutputStream sink1 = new ByteArrayOutputStream(); Compressor.compressStream(source1, sink1); InputStream source2 = new ByteArrayInputStream(sink1.toByteArray()); ByteArrayOutputStream sink2 = new ByteArrayOutputStream(); Compressor.decompressStream(source2, sink2); assertEquals(s_json, sink2.toString()); }