@Test
public void testProcessShouldAddContentEncodingHeaderWithValueAndCompressResponseBodyWhenGzipCompressionIsNeeded() {

    //GIVEN
    given(req.getHeader(HEADER_KEY_ACCEPT_ENCODING)).willReturn(HEADER_VALUE_GZIP);
    given(gzipCompressor.compress(any(ByteArrayInputStream.class))).willReturn(outputStream);
    given(outputStream.toByteArray()).willReturn(responseBody);
    //WHEN
    byte[] actual = underTest.process(req, resp, responseBody);
    //THEN
    verify(resp).addHeader(HEADER_KEY_CONTENT_ENCODING, HEADER_VALUE_GZIP);
    assertEquals(actual, responseBody);
}