AnalyticsTrackerHelper { public void trackEvent(String category, String action) { analyticsTracker.send( new HitBuilders.EventBuilder() .setCategory(category) .setAction(action) .build() ); } @Inject  AnalyticsTrackerHelper(Tracker analyticsTracker); void trackScreenView(String screenName); void trackEvent(String category, String action);  }
@Test public void shouldTrackEventProperly() { analyticsTrackerHelper.trackEvent(AnalyticsTags.CATEGORY_ACTION, AnalyticsTags.ACTION_SHARE); verify(mockAnalyticsTracker).send(anyMap()); }