GoogleAnalytics extends ServiceImpl implements EventTrackingService { @Override public void enable(String trackingId) { this.trackingId = trackingId; } GoogleAnalytics(Context context); @Override void enable(String trackingId); @Override boolean isEnabled(); @Override ServiceType getServiceType(); void logEvent(Context context, String event);  }
@Test public void testEnable() { GoogleAnalytics googleAnalytics = new GoogleAnalytics(null); assertFalse(googleAnalytics.isEnabled()); googleAnalytics.enable("unit_test_tracking_id"); assertTrue(googleAnalytics.isEnabled()); }