try {
TestInterface api = Feign.create(TestInterface.class, "http://localhost:" + server.getPort(), new TestInterface.Module());
api.gzipBody(Arrays.asList("netflix", "denominator", "password"));
RecordedRequest request = server.takeRequest();
assertNull(request.getHeader("Content-Length"));
byte[] compressedBody = request.getBody();
String uncompressedBody = CharStreams.toString(CharStreams.newReaderSupplier(
GZIPStreams.newInputStreamSupplier(ByteStreams.newInputStreamSupplier(compressedBody)), UTF_8));
assertEquals(uncompressedBody, "[netflix, denominator, password]");