Mixpanel extends ServiceImpl implements EventTrackingService { @Override public void enable(String projectToken) { this.projectToken = projectToken; } Mixpanel(Context context); @Override void enable(String projectToken); @Override boolean isEnabled(); @Override ServiceType getServiceType(); @Override void logEvent(Context context, String eventName);  }
@Test public void testEnable() { Mixpanel mixpanel = new Mixpanel(null); assertFalse(mixpanel.isEnabled()); mixpanel.enable("unit_test_key"); assertTrue(mixpanel.isEnabled()); }