@Test public void listArticlesByDebatesWithCache_paging() throws Exception { assertEquals(0, service.listArticlesByDebatesWithCache(Collections.emptyList()).size()); Article a2 = savedArticle(zoneInfo, citizen, "another article"); Debate d1 = savedDebate(article, "foo-12345", null); Debate d2 = savedDebate(a2, "foo-about", null); Debate d3 = savedDebate(a2, "foo-duplicate", null); List<Article> articles = service.listArticlesByDebatesWithCache(asList(d1.getDebateId(), d2.getDebateId(), d3.getDebateId())); assertEquals(2, articles.size()); assertTrue(articles.containsAll(asList(article, a2))); }
@Override public List<Article> listArticlesByDebatesWithCache(List<FlakeId> debateIds) { return articleDao.listArticlesByDebatesWithCache(debateIds); }
ArticleServiceImpl implements ArticleService { @Override public List<Article> listArticlesByDebatesWithCache(List<FlakeId> debateIds) { return articleDao.listArticlesByDebatesWithCache(debateIds); } }
ArticleServiceImpl implements ArticleService { @Override public List<Article> listArticlesByDebatesWithCache(List<FlakeId> debateIds) { return articleDao.listArticlesByDebatesWithCache(debateIds); }  }
ArticleServiceImpl implements ArticleService { @Override public List<Article> listArticlesByDebatesWithCache(List<FlakeId> debateIds) { return articleDao.listArticlesByDebatesWithCache(debateIds); }  @Override Article createExternalLink(Authorization authorization,
      Zone zone,
      String title,
      String link); @Override boolean canCreateArticle(Zone zone, Authorization auth); @Override Article createSpeak(Authorization authorization, Zone zone, String title, String content); @Override Optional<Article> findArticle(FlakeId articleId); @Override List<Article> listLatestZoneArticles(Zone zone, @Nullable FlakeId startArticleId); @Override Article loadArticle(FlakeId articleId); @Override String loadEditableDebateContent(FlakeId debateId, Authorization editor); @Override String updateDebateContent(FlakeId debateId, Authorization editorAuth, String content); @Override Debate debate(FlakeId articleId,
      @Nullable FlakeId parentDebateId,
      Authorization debaterAuth,
      String content); @Override DebateTree listBestDebates(FlakeId articleId, @Nullable FlakeId parentDebateId); @Override List<Article> listHotZoneArticles(Zone zone, FlakeId startArticleId); @Override @Cacheable(value = "rssHotArticles") List<Article> listRssHotZoneArticlesWithCache(Zone zone); @Override @Cacheable(value = "rssHotArticles") List<Article> listRssTopArticlesWithCache(); @Override List<Article> listLatestArticles(@Nullable FlakeId startArticleId); @Override List<Article> listTopArticles(@Nullable FlakeId startArticleId); @Override Debate loadDebateWithoutCache(FlakeId debateId); @Override Debate loadDebateWithCache(FlakeId debateId); @Override List<Debate> listReplyToDebates(Authorization authorization,
      @Nullable FlakeId startDebateId); @Override List<Debate> listLatestDebates(@Nullable FlakeId startDebateId); @Override List<Debate> listLatestZoneDebates(Zone zone, @Nullable FlakeId startDebateId); @Override List<Article> listArticlesByDebatesWithCache(List<FlakeId> debateIds); @Override List<Debate> listDebatesByIdWithCache(List<FlakeId> debateIds); @Override List<Article> listArticlesByAuthor(String username, @Nullable FlakeId startArticleId); @Override List<Debate> listDebatesByDebater(String username, @Nullable FlakeId startDebateId); @Override boolean isExternalLinkExist(Zone zone, String externalLink); @Override List<Article> listArticlesByExternalLink(Zone zone, String externalLink); @Override void deleteArticle(Authorization authorization, FlakeId articleId); @Override boolean canDeleteArticle(String username, FlakeId articleId); }
ArticleServiceImpl implements ArticleService { @Override public List<Article> listArticlesByDebatesWithCache(List<FlakeId> debateIds) { return articleDao.listArticlesByDebatesWithCache(debateIds); }  @Override Article createExternalLink(Authorization authorization,
      Zone zone,
      String title,
      String link); @Override boolean canCreateArticle(Zone zone, Authorization auth); @Override Article createSpeak(Authorization authorization, Zone zone, String title, String content); @Override Optional<Article> findArticle(FlakeId articleId); @Override List<Article> listLatestZoneArticles(Zone zone, @Nullable FlakeId startArticleId); @Override Article loadArticle(FlakeId articleId); @Override String loadEditableDebateContent(FlakeId debateId, Authorization editor); @Override String updateDebateContent(FlakeId debateId, Authorization editorAuth, String content); @Override Debate debate(FlakeId articleId,
      @Nullable FlakeId parentDebateId,
      Authorization debaterAuth,
      String content); @Override DebateTree listBestDebates(FlakeId articleId, @Nullable FlakeId parentDebateId); @Override List<Article> listHotZoneArticles(Zone zone, FlakeId startArticleId); @Override @Cacheable(value = "rssHotArticles") List<Article> listRssHotZoneArticlesWithCache(Zone zone); @Override @Cacheable(value = "rssHotArticles") List<Article> listRssTopArticlesWithCache(); @Override List<Article> listLatestArticles(@Nullable FlakeId startArticleId); @Override List<Article> listTopArticles(@Nullable FlakeId startArticleId); @Override Debate loadDebateWithoutCache(FlakeId debateId); @Override Debate loadDebateWithCache(FlakeId debateId); @Override List<Debate> listReplyToDebates(Authorization authorization,
      @Nullable FlakeId startDebateId); @Override List<Debate> listLatestDebates(@Nullable FlakeId startDebateId); @Override List<Debate> listLatestZoneDebates(Zone zone, @Nullable FlakeId startDebateId); @Override List<Article> listArticlesByDebatesWithCache(List<FlakeId> debateIds); @Override List<Debate> listDebatesByIdWithCache(List<FlakeId> debateIds); @Override List<Article> listArticlesByAuthor(String username, @Nullable FlakeId startArticleId); @Override List<Debate> listDebatesByDebater(String username, @Nullable FlakeId startDebateId); @Override boolean isExternalLinkExist(Zone zone, String externalLink); @Override List<Article> listArticlesByExternalLink(Zone zone, String externalLink); @Override void deleteArticle(Authorization authorization, FlakeId articleId); @Override boolean canDeleteArticle(String username, FlakeId articleId);  }