@Test
public void shouldReturnZippedOutputStream() {

    // given
    when(delegate.put(any(), any())).thenReturn(mock(OutputStream.class));
    ContentCache contentCache = new ZippedContentCache(delegate);
    // when
    final OutputStream stream = contentCache.put(() -> StringUtils.EMPTY, ContentCache.TimeToLive.DEFAULT);
    // then
    verify(delegate, times(1)).put(any(), any());
    assertEquals(GZIPOutputStream.class, stream.getClass());
}