test_class.declarator: delegate
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ContentCache delegate;
test_class.type: ContentCache
test_class.var_name: delegate
test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/cache/ZippedContentCacheTest.java
test_class.identifier: ZippedContentCacheTest
test_case.body: @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());
      }
test_case.class_method_signature: ZippedContentCacheTest.shouldReturnZippedOutputStream()
test_case.full_signature: @Test public void shouldReturnZippedOutputStream()
test_case.identifier: shouldReturnZippedOutputStream
test_case.invocations: thenReturn when put any any mock put put verify times any any assertEquals getClass
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldReturnZippedOutputStream()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(ZippedContentCache.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(ZippedContentCache.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: delegate
focal_class.modifier: private final
focal_class.original_string: private final ContentCache delegate;
focal_class.type: ContentCache
focal_class.var_name: delegate
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/cache/ZippedContentCache.java
focal_class.identifier: ZippedContentCache
focal_class.interfaces: implements ContentCache
focal_class.class_method_signature: ZippedContentCache.ZippedContentCache(ContentCache delegate)
focal_class.full_signature: public  ZippedContentCache(ContentCache delegate)
focal_class.identifier: ZippedContentCache
focal_class.modifiers: public
focal_class.parameters: (ContentCache delegate)
focal_class.signature:  ZippedContentCache(ContentCache delegate)
focal_class.class_method_signature: ZippedContentCache.has(ContentCacheKey key)
focal_class.full_signature: @Override @Timed public boolean has(ContentCacheKey key)
focal_class.identifier: has
focal_class.modifiers: @Override @Timed public
focal_class.parameters: (ContentCacheKey key)
focal_class.return: boolean
focal_class.signature: boolean has(ContentCacheKey key)
focal_class.class_method_signature: ZippedContentCache.get(ContentCacheKey key)
focal_class.full_signature: @Override @VolumeMetered public InputStream get(ContentCacheKey key)
focal_class.identifier: get
focal_class.modifiers: @Override @VolumeMetered public
focal_class.parameters: (ContentCacheKey key)
focal_class.return: InputStream
focal_class.signature: InputStream get(ContentCacheKey key)
focal_class.class_method_signature: ZippedContentCache.put(ContentCacheKey key, TimeToLive timeToLive)
focal_class.full_signature: @Override @VolumeMetered public OutputStream put(ContentCacheKey key, TimeToLive timeToLive)
focal_class.identifier: put
focal_class.modifiers: @Override @VolumeMetered public
focal_class.parameters: (ContentCacheKey key, TimeToLive timeToLive)
focal_class.return: OutputStream
focal_class.signature: OutputStream put(ContentCacheKey key, TimeToLive timeToLive)
focal_class.class_method_signature: ZippedContentCache.evict(ContentCacheKey key)
focal_class.full_signature: @Override @Timed public void evict(ContentCacheKey key)
focal_class.identifier: evict
focal_class.modifiers: @Override @Timed public
focal_class.parameters: (ContentCacheKey key)
focal_class.return: void
focal_class.signature: void evict(ContentCacheKey key)
focal_class.class_method_signature: ZippedContentCache.evictMatch(ContentCacheKey key)
focal_class.full_signature: @Override @Timed public void evictMatch(ContentCacheKey key)
focal_class.identifier: evictMatch
focal_class.modifiers: @Override @Timed public
focal_class.parameters: (ContentCacheKey key)
focal_class.return: void
focal_class.signature: void evictMatch(ContentCacheKey key)
focal_class.class_method_signature: ZippedContentCache.move(ContentCacheKey from, ContentCacheKey to, TimeToLive toTimeToLive)
focal_class.full_signature: @Override @Timed public void move(ContentCacheKey from, ContentCacheKey to, TimeToLive toTimeToLive)
focal_class.identifier: move
focal_class.modifiers: @Override @Timed public
focal_class.parameters: (ContentCacheKey from, ContentCacheKey to, TimeToLive toTimeToLive)
focal_class.return: void
focal_class.signature: void move(ContentCacheKey from, ContentCacheKey to, TimeToLive toTimeToLive)
focal_class.class_method_signature: ZippedContentCache.clear()
focal_class.full_signature: @Override @Timed public void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override @Timed public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_method.body: @Override
      @VolumeMetered
      public OutputStream put(ContentCacheKey key, TimeToLive timeToLive) {
          return ofNullable(delegate.put(key, timeToLive)) //
                  .map(entry -> {
                      try {
                          return new GZIPOutputStream(entry);
                      } catch (IOException e) {
                          throw new TDPException(CommonErrorCodes.UNEXPECTED_EXCEPTION, e);
                      }
                  }) //
                  .orElse(null);
      }
focal_method.class_method_signature: ZippedContentCache.put(ContentCacheKey key, TimeToLive timeToLive)
focal_method.full_signature: @Override @VolumeMetered public OutputStream put(ContentCacheKey key, TimeToLive timeToLive)
focal_method.identifier: put
focal_method.invocations: orElse map ofNullable put
focal_method.modifiers: @Override @VolumeMetered public
focal_method.parameters: (ContentCacheKey key, TimeToLive timeToLive)
focal_method.return: OutputStream
focal_method.signature: OutputStream put(ContentCacheKey key, TimeToLive timeToLive)