@Override
    public final void aroundWriteTo(WriterInterceptorContext context) throws IOException {
        final String contentEncoding = (String) context.getHeaders().getFirst(HttpHeaders.CONTENT_ENCODING);
        if ((contentEncoding != null) &&
                (contentEncoding.equals("gzip") || contentEncoding.equals("x-gzip"))) {
            context.setOutputStream(new GZIPOutputStream(context.getOutputStream()));
        }
        context.proceed();
    }
@Test
    void noEncodingwillNotAroundWrite() throws IOException, WebApplicationException {
        MultivaluedMap<String, Object> headers = new MultivaluedHashMap<>();
        headers.add(HttpHeaders.CONTENT_ENCODING, null);
        WriterInterceptorContextMock context = new WriterInterceptorContextMock(headers);
        new ConfiguredGZipEncoder(true).aroundWriteTo(context);
        assertThat(context.getOutputStream()).isNotInstanceOf(GZIPOutputStream.class);
        assertThat(context.isProceedCalled()).isTrue();
    }