AnalyticsTrackerHelper { public void trackScreenView(String screenName) { analyticsTracker.setScreenName(screenName); analyticsTracker.send( new HitBuilders.ScreenViewBuilder() .build() ); } @Inject  AnalyticsTrackerHelper(Tracker analyticsTracker); void trackScreenView(String screenName); void trackEvent(String category, String action);  }
@Test public void shouldTrackScreenViewProperly() { analyticsTrackerHelper.trackScreenView(AnalyticsTags.SCREEN_CAT_VIEWER_ACTIVITY); verify(mockAnalyticsTracker).setScreenName(AnalyticsTags.SCREEN_CAT_VIEWER_ACTIVITY); verify(mockAnalyticsTracker).send(anyMap()); }