@SuppressWarnings("unchecked")
@Test(expected = Error.class)
public void executionExceptionWithError() throws IOException, ExecutionException {

  TemplateSource source = createMock(TemplateSource.class);
  Parser parser = createMock(Parser.class);
  Cache<TemplateSource, Template> cache = createMock(Cache.class);
  expect(cache.get(eq(source), isA(Callable.class))).andThrow(
      new ExecutionException(new Error()));
  replay(cache, source, parser);
  new GuavaTemplateCache(cache).get(source, parser);
  verify(cache, source, parser);
}