ArticleViewer { public static void viewArticle(Context context, Article article, ActivityHelper helper) { Tracker analytics = Reporting.getTracker(context); analytics.log(new ArticleViewedEvent(article)); helper.openCustomTab(Uri.parse(article.getLink())); }  static void viewArticle(Context context, Article article, ActivityHelper helper);  }
@Test public void viewArticleCustomTabsUGent() { ActivityHelper helper = mock(ActivityHelper.class); UgentNewsArticle newsItem = generate(UgentNewsArticle.class); ArticleViewer.viewArticle(RobolectricUtils.getActivityContext(), newsItem, helper); verify(helper, times(1)).openCustomTab(any(Uri.class)); }
@Test public void viewArticleCustomTabsSchamper() { ActivityHelper helper = mock(ActivityHelper.class); Article newsItem = generate(Article.class); ArticleViewer.viewArticle(RobolectricUtils.getActivityContext(), newsItem, helper); verify(helper, times(1)).openCustomTab(any(Uri.class)); }