@Test public void test() throws IOException { String obj = "Foo"; StreamingEncoder<String> encoder = new GZIPStreamingEncoderWrapper<>(new StreamingSerializableCodec<>()); StreamingDecoder<String> decoder = new GZIPStreamingDecoderWrapper<>(new StreamingSerializableCodec<>()); ByteArrayOutputStream bos=new ByteArrayOutputStream(); encoder.encode(obj, bos); ByteArrayInputStream bis=new ByteArrayInputStream(bos.toByteArray()); String decoded = decoder.decode(bis); assertEquals(obj, decoded); } }