test_class.file: handlebars/src/test/java/com/github/jknack/handlebars/cache/HighConcurrencyTemplateCacheTest.java
test_class.identifier: HighConcurrencyTemplateCacheTest
test_case.body: @Test(expected = IllegalArgumentException.class)
    @SuppressWarnings("unchecked")
    public void runtimeException() throws IOException, InterruptedException, ExecutionException {
      TemplateSource source = createMock(TemplateSource.class);
      expect(source.lastModified()).andReturn(615L).times(3);
  
      Template template = createMock(Template.class);
  
      Future<Pair<TemplateSource, Template>> future = createMock(Future.class);
      expect(future.get()).andThrow(new ExecutionException(new IllegalArgumentException()));
  
      Capture<TemplateSource> keyGet = EasyMock.newCapture();
      Capture<TemplateSource> keyRemove = EasyMock.newCapture();
  
      ConcurrentMap<TemplateSource, Future<Pair<TemplateSource, Template>>> cache = createMock(
          ConcurrentMap.class);
  
      expect(cache.get(capture(keyGet))).andReturn(future);
      expect(cache.remove(capture(keyRemove), eq(future))).andReturn(true);
  
      Parser parser = createMock(Parser.class);
  
      Object[] mocks = {cache, source, future, template };
  
      replay(mocks);
  
      Template result = new HighConcurrencyTemplateCache(cache).get(source, parser);
      assertEquals(template, result);
  
      verify(mocks);
    }
test_case.class_method_signature: HighConcurrencyTemplateCacheTest.runtimeException()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) @SuppressWarnings("unchecked") public void runtimeException()
test_case.identifier: runtimeException
test_case.invocations: createMock times andReturn expect lastModified createMock createMock andThrow expect get newCapture newCapture createMock andReturn expect get capture andReturn expect remove capture eq createMock replay get assertEquals verify
test_case.modifiers: @Test(expected = IllegalArgumentException.class) @SuppressWarnings("unchecked") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void runtimeException()
focal_class.declarator: logger = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: cache
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentMap<TemplateSource, Future<Pair<TemplateSource, Template>>> cache;
focal_class.type: ConcurrentMap<TemplateSource, Future<Pair<TemplateSource, Template>>>
focal_class.var_name: cache
focal_class.declarator: reload
focal_class.modifier: private
focal_class.original_string: private boolean reload;
focal_class.type: boolean
focal_class.var_name: reload
focal_class.file: handlebars/src/main/java/com/github/jknack/handlebars/cache/HighConcurrencyTemplateCache.java
focal_class.identifier: HighConcurrencyTemplateCache
focal_class.interfaces: implements TemplateCache
focal_class.class_method_signature: HighConcurrencyTemplateCache.HighConcurrencyTemplateCache(
        final ConcurrentMap<TemplateSource, Future<Pair<TemplateSource, Template>>> cache)
focal_class.full_signature: protected  HighConcurrencyTemplateCache(
        final ConcurrentMap<TemplateSource, Future<Pair<TemplateSource, Template>>> cache)
focal_class.identifier: HighConcurrencyTemplateCache
focal_class.modifiers: protected
focal_class.parameters: (
        final ConcurrentMap<TemplateSource, Future<Pair<TemplateSource, Template>>> cache)
focal_class.signature:  HighConcurrencyTemplateCache(
        final ConcurrentMap<TemplateSource, Future<Pair<TemplateSource, Template>>> cache)
focal_class.class_method_signature: HighConcurrencyTemplateCache.HighConcurrencyTemplateCache()
focal_class.full_signature: public  HighConcurrencyTemplateCache()
focal_class.identifier: HighConcurrencyTemplateCache
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  HighConcurrencyTemplateCache()
focal_class.class_method_signature: HighConcurrencyTemplateCache.clear()
focal_class.full_signature: @Override public void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: HighConcurrencyTemplateCache.evict(final TemplateSource source)
focal_class.full_signature: @Override public void evict(final TemplateSource source)
focal_class.identifier: evict
focal_class.modifiers: @Override public
focal_class.parameters: (final TemplateSource source)
focal_class.return: void
focal_class.signature: void evict(final TemplateSource source)
focal_class.class_method_signature: HighConcurrencyTemplateCache.get(final TemplateSource source, final Parser parser)
focal_class.full_signature: @Override public Template get(final TemplateSource source, final Parser parser)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (final TemplateSource source, final Parser parser)
focal_class.return: Template
focal_class.signature: Template get(final TemplateSource source, final Parser parser)
focal_class.class_method_signature: HighConcurrencyTemplateCache.setReload(final boolean reload)
focal_class.full_signature: @Override public HighConcurrencyTemplateCache setReload(final boolean reload)
focal_class.identifier: setReload
focal_class.modifiers: @Override public
focal_class.parameters: (final boolean reload)
focal_class.return: HighConcurrencyTemplateCache
focal_class.signature: HighConcurrencyTemplateCache setReload(final boolean reload)
focal_class.class_method_signature: HighConcurrencyTemplateCache.cacheGet(final TemplateSource source, final Parser parser)
focal_class.full_signature: private Template cacheGet(final TemplateSource source, final Parser parser)
focal_class.identifier: cacheGet
focal_class.modifiers: private
focal_class.parameters: (final TemplateSource source, final Parser parser)
focal_class.return: Template
focal_class.signature: Template cacheGet(final TemplateSource source, final Parser parser)
focal_class.class_method_signature: HighConcurrencyTemplateCache.newTask(final TemplateSource source,
        final Parser parser)
focal_class.full_signature: private FutureTask<Pair<TemplateSource, Template>> newTask(final TemplateSource source,
        final Parser parser)
focal_class.identifier: newTask
focal_class.modifiers: private
focal_class.parameters: (final TemplateSource source,
        final Parser parser)
focal_class.return: FutureTask<Pair<TemplateSource, Template>>
focal_class.signature: FutureTask<Pair<TemplateSource, Template>> newTask(final TemplateSource source,
        final Parser parser)
focal_class.class_method_signature: HighConcurrencyTemplateCache.putIfAbsent(final TemplateSource source,
        final FutureTask<Pair<TemplateSource, Template>> futureTask)
focal_class.full_signature: private Future<Pair<TemplateSource, Template>> putIfAbsent(final TemplateSource source,
        final FutureTask<Pair<TemplateSource, Template>> futureTask)
focal_class.identifier: putIfAbsent
focal_class.modifiers: private
focal_class.parameters: (final TemplateSource source,
        final FutureTask<Pair<TemplateSource, Template>> futureTask)
focal_class.return: Future<Pair<TemplateSource, Template>>
focal_class.signature: Future<Pair<TemplateSource, Template>> putIfAbsent(final TemplateSource source,
        final FutureTask<Pair<TemplateSource, Template>> futureTask)
focal_class.class_method_signature: HighConcurrencyTemplateCache.launderThrowable(final TemplateSource source, final Throwable cause)
focal_class.full_signature: private RuntimeException launderThrowable(final TemplateSource source, final Throwable cause)
focal_class.identifier: launderThrowable
focal_class.modifiers: private
focal_class.parameters: (final TemplateSource source, final Throwable cause)
focal_class.return: RuntimeException
focal_class.signature: RuntimeException launderThrowable(final TemplateSource source, final Throwable cause)
focal_method.body: @Override
    public Template get(final TemplateSource source, final Parser parser) throws IOException {
      notNull(source, "The source is required.");
      notNull(parser, "The parser is required.");
  
      /**
       * Don't keep duplicated entries, remove old templates if a change is detected.
       */
      return cacheGet(source, parser);
    }
focal_method.class_method_signature: HighConcurrencyTemplateCache.get(final TemplateSource source, final Parser parser)
focal_method.full_signature: @Override public Template get(final TemplateSource source, final Parser parser)
focal_method.identifier: get
focal_method.invocations: notNull notNull cacheGet
focal_method.modifiers: @Override public
focal_method.parameters: (final TemplateSource source, final Parser parser)
focal_method.return: Template
focal_method.signature: Template get(final TemplateSource source, final Parser parser)